Skip to content

Commit

Permalink
Don't log full stack trace when tray icons are not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
nvdweem committed Jun 14, 2023
1 parent b441e6d commit bdac8fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/getpcpanel/util/TrayService.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public void init() {
var trayIconWidth = new TrayIcon(trayIconImage).getSize().width;
trayIcon = new TrayIcon(trayIconImage.getScaledInstance(trayIconWidth, -1, 4));
trayDisabled = false;
} catch (UnsupportedOperationException e) {
log.warn("Tray icon is not supported");
trayDisabled = true;
return;
} catch (Exception e1) {
log.error("Unable to initialize tray icon", e1);
trayDisabled = true;
Expand Down

0 comments on commit bdac8fd

Please sign in to comment.