Skip to content

Commit

Permalink
Fix issue of e.getCause() returns null
Browse files Browse the repository at this point in the history
  • Loading branch information
yongyang committed Jul 21, 2023
1 parent 199ab44 commit defb41a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ protected Object proceed(int currentPosition) throws Exception {
}
} catch (Exception e) {
Throwable cause = e.getCause();

// e.getCause() may return null
if(cause == null) {
cause = e;
}
if (cause instanceof Error) {
throw (Error) cause;
}
Expand Down

0 comments on commit defb41a

Please sign in to comment.