Skip to content

Commit

Permalink
Class InvocationTargetException add throawable cause (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Ski authored Aug 31, 2023
1 parent 3775626 commit 37271ad
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,9 @@ public T newInstance() throws InstantiationException, IllegalAccessException {
} catch (NoSuchMethodException e) {
throw new InstantiationException(e.getMessage());
} catch (InvocationTargetException e) {
throw new InstantiationException(e.getMessage());
InstantiationException instantiationException = new InstantiationException(e.getMessage());
instantiationException.initCause(e.getTargetException());
throw instantiationException;
}
}

Expand Down

0 comments on commit 37271ad

Please sign in to comment.