diff --git a/src/main/java/org/apache/commons/lang3/event/EventUtils.java b/src/main/java/org/apache/commons/lang3/event/EventUtils.java index c5baf62c7..5f18a601e 100644 --- a/src/main/java/org/apache/commons/lang3/event/EventUtils.java +++ b/src/main/java/org/apache/commons/lang3/event/EventUtils.java @@ -56,7 +56,7 @@ public class EventUtils { + " does not have an accessible add" + listenerType.getSimpleName () + " method which takes a parameter of type " + listenerType.getName() + "."); } catch (final InvocationTargetException e) { - throw new RuntimeException("Unable to add listener.", e.getCause()); + throw new IllegalArgumentException("Unable to add listener.", e.getCause()); } }