This can be convenient for error handling when you're not sure what the exception is but you want to treat it
as a B<File::KDBX::Error>. Example:
- eval { .... };
+ eval { ... };
if (my $error = error(@_)) {
if ($error->type eq 'key.missing') {
handle_missing_key($error);