mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Expect more exceptions
This commit is contained in:
parent
2d07615f5e
commit
43524d8101
2 changed files with 4 additions and 3 deletions
|
@ -4,11 +4,11 @@ import io.xpipe.app.core.mode.OperationMode;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.core.process.OsType;
|
import io.xpipe.core.process.OsType;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
|
|
||||||
public class AppTrayIcon {
|
public class AppTrayIcon {
|
||||||
|
|
||||||
|
@ -90,7 +90,8 @@ public class AppTrayIcon {
|
||||||
tray.add(this.trayIcon);
|
tray.add(this.trayIcon);
|
||||||
fixBackground();
|
fixBackground();
|
||||||
} catch (Exception e) {
|
} 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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class AppDownloads {
|
||||||
var changelog = json.required("changelog").asText();
|
var changelog = json.required("changelog").asText();
|
||||||
return Optional.of(changelog);
|
return Optional.of(changelog);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
ErrorEvent.fromThrowable(t).omit().handle();
|
ErrorEvent.fromThrowable(t).omit().expected().handle();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue