Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gracefully handle JNI errors during ConnectedWallet.connect() #15

Open
overheadhunter opened this issue Jul 4, 2022 · 1 comment
Open

Comments

@overheadhunter
Copy link
Member

See cryptomator/cryptomator#1694:

Loading the FFI libs may fail, in which case we expect KDEWallet to not be available instead of the application crashing. Catching the UnsatisfiedLinkError in here should fix this:

static Optional<ConnectedWallet> connect() {
try {
return Optional.of(new ConnectedWallet(getNewConnection()));
} catch (DBusException e) {
LOG.warn("Connecting to D-Bus failed.", e);
return Optional.empty();
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant