LeXtract.Error.Invalid.Config exception (lextract v0.1.2)

View Source

Error for configuration validation failures.

Wraps NimbleOptions.ValidationError and provides context about which configuration options are invalid.

Examples

iex> error = LeXtract.Error.Invalid.Config.exception(
...>   errors: "invalid value for :max_char_buffer option: expected positive integer, got: -1"
...> )
iex> String.contains?(Exception.message(error), "max_char_buffer")
true

Summary

Functions

Formats the error message for configuration validation errors.

Types

t()

@type t() :: %LeXtract.Error.Invalid.Config{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  errors: String.t() | [String.t()],
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Functions

exception(args)

@spec exception(opts :: Keyword.t()) :: %LeXtract.Error.Invalid.Config{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  errors: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Create an Elixir.LeXtract.Error.Invalid.Config without raising it.

Keys

  • :errors

message(exception)

@spec message(t()) :: String.t()

Formats the error message for configuration validation errors.