Honeybadger v0.12.0 Honeybadger.Notice View Source

A Honeybadger.Notice struct is used to bundle an exception with system information.

Link to this section Summary

Functions

Create a new Honeybadger.Notice struct for various error types.

Link to this section Types

Link to this type

noticeable() View Source
noticeable() :: Exception.t() | String.t() | map() | atom()

Link to this type

t() View Source
t() :: %Honeybadger.Notice{
  error: error(),
  notifier: notifier(),
  request: map(),
  server: server()
}

Link to this section Functions

Link to this function

new(error, metadata, backtrace) View Source
new(noticeable(), map(), list()) :: t()

Create a new Honeybadger.Notice struct for various error types.

Example

iex> Honeybadger.Notice.new("oops", %{}, []).error
%{backtrace: [], class: "RuntimeError", message: "oops", tags: []}

iex> Honeybadger.Notice.new(:badarg, %{}, []).error
%{backtrace: [], class: "ArgumentError", message: "argument error", tags: []}

iex> Honeybadger.Notice.new(%RuntimeError{message: "oops"}, %{}, []).error
%{backtrace: [], class: "RuntimeError", message: "oops", tags: []}