Skip to content

Commit 922ee1c

Browse files
committed
Added better exception handling; prettied up code formatting
1 parent b84073f commit 922ee1c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/cryptomator/linux/keychain/KDEWalletKeychainAccess.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ public KDEWalletKeychainAccess() {
2828
try {
2929
conn = DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION);
3030
} catch (RuntimeException e) {
31-
LOG.warn("SESSION DBus not found.", e);
31+
if (e.getMessage() == "Cannot Resolve Session Bus Address") {
32+
LOG.warn("SESSION DBus not found.");
33+
}
3234
}
33-
if(conn == null){
35+
if (conn == null) {
3436
conn = DBusConnection.getConnection(DBusConnection.DBusBusType.SYSTEM);
3537
}
3638
wallet = new ConnectedWallet(conn);

0 commit comments

Comments
 (0)