Crate error_support

Source

Re-exports§

pub use backtrace;

Macros§

breadcrumb
Tell the application to log a breadcrumb
debug
define_error
All the error boilerplate (okay, with a couple exceptions in some cases) in one place.
define_error_conversions
Define a set of conversions from external error types into the provided error kind. Use define_error to do this at the same time as define_error_wrapper.
define_error_wrapper
XXX - Most of this is now considered deprecated - only FxA uses it, and should be replaced with the facilities in the handling module.
error
info
report_error
Tell the application to report an error
trace
trace_error
Log a breadcrumb if we see an Result::Err value
warn

Structs§

ErrorHandling
Specifies how an “internal” error is converted to an “external” public error and any logging or reporting that should happen.
ErrorReporting
Describes what error reporting action should be taken.

Traits§

GetErrorHandling
A trait to define how errors are converted and reported.

Functions§

convert_log_report_error
Handle the specified “internal” error, taking any logging or error reporting actions and converting the error to the public error. Called by our handle_error macro so needs to be public.
init_for_tests
Initialize a logging environment suitable for testing. Logging can be configured in the environment (eg, via the RUST_LOG_LEVEL variable), and if not so configured, will default to the Level::Error level.
redact_compact_jwe
Redact compact jwe string (Five base64 segments, separated by . chars)
redact_url
Redact a URL.
report_breadcrumb
report_error_to_app

Type Aliases§

Level

Attribute Macros§

handle_error
A procedural macro that exposes internal errors to external errors the consuming applications should handle. It requires that the internal error implements [error_support::ErrorHandling].