mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-19 09:06:54 -04:00
rethrow AWTException as TrayMenuException
This commit is contained in:
@@ -37,7 +37,7 @@ public class AwtTrayMenuController implements TrayMenuController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showTrayIcon(byte[] rawImageData, Runnable defaultAction, String tooltip) {
|
||||
public void showTrayIcon(byte[] rawImageData, Runnable defaultAction, String tooltip) throws TrayMenuException {
|
||||
var image = Toolkit.getDefaultToolkit().createImage(rawImageData);
|
||||
var trayIcon = new TrayIcon(image, tooltip, menu);
|
||||
|
||||
@@ -50,7 +50,7 @@ public class AwtTrayMenuController implements TrayMenuController {
|
||||
SystemTray.getSystemTray().add(trayIcon);
|
||||
LOG.debug("initialized tray icon");
|
||||
} catch (AWTException e) {
|
||||
LOG.error("Error adding tray icon", e);
|
||||
throw new TrayMenuException("Failed to add icon to system tray.", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user