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 geoand committed Jul 25, 2023
1 parent 674ea46 commit f48c359
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 f48c359

Please sign in to comment.