Current section

Files

Jump to
new_relic_agent lib new_relic transaction error_handler.ex
Raw

lib/new_relic/transaction/error_handler.ex

defmodule NewRelic.Transaction.ErrorHandler do
# This macro injects a Plug.ErrorHandler that will ensure that
# requests that end in an error still get reported
@moduledoc false
defmacro __using__(_) do
quote do
use Plug.ErrorHandler
def handle_errors(conn, error) do
NewRelic.Transaction.handle_errors(conn, error)
end
end
end
end