Expect more exceptions

This commit is contained in:
crschnick 2024-07-15 19:01:43 +00:00
parent 2d07615f5e
commit 43524d8101
2 changed files with 4 additions and 3 deletions

View file

@ -4,11 +4,11 @@ import io.xpipe.app.core.mode.OperationMode;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.core.process.OsType;
import javax.imageio.ImageIO;
import java.awt.*;
import java.io.IOException;
import java.lang.reflect.Field;
import java.net.URL;
import javax.imageio.ImageIO;
public class AppTrayIcon {
@ -90,7 +90,8 @@ public class AppTrayIcon {
tray.add(this.trayIcon);
fixBackground();
} catch (Exception e) {
ErrorEvent.fromThrowable("Unable to add TrayIcon", e).handle();
// This can sometimes fail on Linux
ErrorEvent.fromThrowable("Unable to add TrayIcon", e).expected().handle();
}
});
}

View file

@ -91,7 +91,7 @@ public class AppDownloads {
var changelog = json.required("changelog").asText();
return Optional.of(changelog);
} catch (Throwable t) {
ErrorEvent.fromThrowable(t).omit().handle();
ErrorEvent.fromThrowable(t).omit().expected().handle();
}
try {