Phoenix.Controller.Exception
Formats Plug exceptions and handles Error logging
Logging from Error controllers
defmodule MyErrorController do
...
def error(conn, _) do
Phoenix.Controller.Exception.log(conn)
render conn, "pretty_error_page"
end
end
Summary
| from_conn(conn) | Returns |
| log(exception) | Logs the caught conn exception as an error |
Functions
Returns Exception struct from caught conn exception or :no_exception
Examples
iex> Exception.from_conn(conn)
%Exception{...}
iex> Exception.from_conn(conn)
:no_exception