LeXtract.Error.Invalid.Format exception (lextract v0.1.2)
View SourceError for unknown or invalid format types.
Raised when a format string doesn't match supported formats (json, yaml).
Examples
iex> error = LeXtract.Error.Invalid.Format.exception(format_string: "xml")
iex> Exception.message(error)
"Unknown format type: xml"
iex> error = LeXtract.Error.Invalid.Format.exception(
...> format_string: "xml",
...> reason: "Only JSON and YAML are supported"
...> )
iex> String.contains?(Exception.message(error), "Only JSON and YAML")
true
Summary
Functions
Create an Elixir.LeXtract.Error.Invalid.Format without raising it.
Formats the error message for format type errors.
Types
Functions
@spec exception(opts :: Keyword.t()) :: %LeXtract.Error.Invalid.Format{ __exception__: true, bread_crumbs: term(), class: term(), format_string: term(), path: term(), reason: term(), splode: term(), stacktrace: term(), vars: term() }
Create an Elixir.LeXtract.Error.Invalid.Format without raising it.
Keys
- :format_string
- :reason
Formats the error message for format type errors.