Skip to main content

set_error_handler

Function set_error_handler 

Source
pub fn set_error_handler(handler: ErrorHandler)
Expand description

Installs a process-wide handler that is called for every LookupError.

The handler runs synchronously on the thread doing the lookup, so keep it cheap (e.g. log or bump a counter). Replaces any previous handler.

ยงExample

fluent_zero::set_error_handler(|error| eprintln!("i18n: {error}"));