LeXtract.Error.External.TemplateRead exception (lextract v0.1.2)
View SourceError for template file I/O failures.
Raised when a template file cannot be read from disk, typically due to missing files, permission issues, or I/O errors.
Examples
iex> error = LeXtract.Error.External.TemplateRead.exception(
...> file_path: "/tmp/missing.json",
...> reason: :enoent
...> )
iex> String.contains?(Exception.message(error), "missing.json")
true
iex> error = LeXtract.Error.External.TemplateRead.exception(
...> file_path: "/etc/protected.json",
...> reason: :eacces
...> )
iex> String.contains?(Exception.message(error), "permission denied")
true
Summary
Functions
Create an Elixir.LeXtract.Error.External.TemplateRead without raising it.
Formats the error message for template read failures.
Types
Functions
@spec exception(opts :: Keyword.t()) :: %LeXtract.Error.External.TemplateRead{ __exception__: true, bread_crumbs: term(), class: term(), file_path: term(), path: term(), reason: term(), splode: term(), stacktrace: term(), vars: term() }
Create an Elixir.LeXtract.Error.External.TemplateRead without raising it.
Keys
- :file_path
- :reason
Formats the error message for template read failures.