Skip to content

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

@overheadhunter

Description

@overheadhunter

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();
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions