pub fn try_register_error_hook( callback: fn(ErrorContext<'_>), ) -> Result<(), &'static str>
Attempt to register a callback function to be called when errors are created.
Returns an error if a hook is already registered.