Add suppressed exceptions to stack.

This commit is contained in:
David Kocher
2026-05-15 11:25:07 +02:00
parent 33a7dda91c
commit a121046b37
2 changed files with 8 additions and 7 deletions
@@ -196,12 +196,7 @@ public class KeychainLoginService implements LoginService {
}
catch(LoginCanceledException c) {
// Canceled by user
try {
c.initCause(e);
}
catch(IllegalArgumentException | IllegalStateException r) {
log.warn("Ignore error {} initializing failure {} with cause {}", r, e, c);
}
c.addSuppressed(e);
throw c;
}
log.debug("Reset credentials for {}", bookmark);
@@ -86,7 +86,13 @@ public class MountWorker extends Worker<Path> {
// Retrieve directory listing of working directory
final ListWorker worker = new ListWorker(cache, home, listener);
listener.message(worker.getActivity());
cache.put(home, worker.run(session));
try {
cache.put(home, worker.run(session));
}
catch(BackgroundException f) {
f.addSuppressed(e);
throw f;
}
return home;
}
}