From 1b25c5802e42d1061645b3597c18242cfda3b879 Mon Sep 17 00:00:00 2001 From: hinerm Date: Tue, 3 Dec 2024 10:28:10 -0600 Subject: [PATCH] ShadowMenu: fix compilation error --- src/main/java/org/scijava/menu/ShadowMenu.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/org/scijava/menu/ShadowMenu.java b/src/main/java/org/scijava/menu/ShadowMenu.java index ce5d8e3cc..f97ab4800 100644 --- a/src/main/java/org/scijava/menu/ShadowMenu.java +++ b/src/main/java/org/scijava/menu/ShadowMenu.java @@ -238,6 +238,13 @@ public URL getIconURL() { } return iconURL; } + catch (final ClassNotFoundException exc) { + final String message = "Failed to load class: " + + moduleInfo.getDelegateClassName(); + if (log.isDebug()) log.debug(message, exc); + else log.error(message); + return null; + } catch (final IllegalArgumentException exc) { final String message = "Could not load icon for class: " + moduleInfo.getDelegateClassName();