Skip to content

Commit

Permalink
HooksInvoker now properly propagates exceptions
Browse files Browse the repository at this point in the history
Fixes #34
  • Loading branch information
julman99 committed Dec 5, 2017
1 parent 45da168 commit 72c126d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/gsonfire/gson/HooksInvoker.java
Expand Up @@ -49,9 +49,9 @@ private void invokeAll(Object obj, Class<? extends Annotation> annotation, JsonE
try {
m.invoke(obj, new HooksInvokerValueSupplier(jsonElement, gson));
} catch (IllegalAccessException e) {
e.printStackTrace();
throw new HookInvocationException("Exception during hook invocation: " + annotation.getSimpleName(), e);
} catch (InvocationTargetException e) {
e.printStackTrace();
throw new HookInvocationException("Exception during hook invocation: " + annotation.getSimpleName(), e.getTargetException());
}
}
}
Expand Down

0 comments on commit 72c126d

Please sign in to comment.