Macro error_support::report_error

source ·
macro_rules! report_error {
    ($type_name:expr, $($arg:tt)*) => { ... };
}
Expand description

Tell the application to report an error

If configured by the application, this sent to the application, which should report it to a Sentry-like system. This should only be used for errors that we don’t expect to see and will work on fixing if we see a non-trivial volume of them.

type_name identifies the error. It should be the main text that gets shown to the user and also how the error system groups errors together. It should be in UpperCamelCase form.

Good type_names require some trial and error, for example:

  • Start with the error kind variant name
  • Add more text to distinguish errors more. For example an error code, or an extra word based on inspecting the error details