LeXtract.Error.Unknown.Unknown exception (lextract v0.1.2)
View SourceCatch-all error for truly unexpected failures.
This error is used when an error doesn't fit any other category or when wrapping arbitrary error values.
Examples
iex> error = LeXtract.Error.Unknown.Unknown.exception(error: "something went wrong")
iex> Exception.message(error)
"something went wrong"
iex> error = LeXtract.Error.Unknown.Unknown.exception(error: %RuntimeError{message: "boom"})
iex> String.contains?(Exception.message(error), "RuntimeError")
true
Summary
Functions
Create an Elixir.LeXtract.Error.Unknown.Unknown without raising it.
Formats the error message.
Types
Functions
@spec exception(opts :: Keyword.t()) :: %LeXtract.Error.Unknown.Unknown{ __exception__: true, bread_crumbs: term(), class: term(), error: term(), path: term(), splode: term(), stacktrace: term(), vars: term() }
Create an Elixir.LeXtract.Error.Unknown.Unknown without raising it.
Keys
- :error
Formats the error message.
If the error is a binary string, returns it as-is. Otherwise, inspects the error value.