Honeybadger v0.10.2 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() | Map.t() | String.t() | atom()
Link to this type t() View Source
t() :: %Honeybadger.Notice{
  error: error(),
  notifier: notifier(),
  request: Map.t(),
  server: server()
}

Link to this section Functions

Link to this function new(error, metadata, backtrace) View Source
new(noticeable(), Map.t(), 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: []}