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 authored and Ladicek committed Jul 24, 2023
1 parent 2da3206 commit a383ba9
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 a383ba9

Please sign in to comment.