Function set_error_to_uniffi_error

Source
pub fn set_error_to_uniffi_error<F>(f: F)
where F: Fn(Box<dyn Error + Send + Sync>) -> Error + Send + Sync + 'static,
Expand description

Configure an error converter to convert errors in calls to [uniffi::custom_type!] into the main error of the application (bitwarden_uniffi::error::BitwardenError). This is needed because if the errors don't match, Uniffi will panic instead of returning an error. This needs to be called by the bitwarden_uniffi` crate before any other Uniffi code is run.