diff options
| author | 2026-08-29 21:50:48 +0200 | |
|---|---|---|
| committer | 2026-08-29 21:51:45 +0200 | |
| commit | eceefd7e1772bed653937b0ff98f6e9309d09b2a (patch) | |
| tree | f3159beaa22ea3695263ed148ac6d152b4519dee /src | |
| parent | ccd82eba2c3ecea7b374cf07568e35f8a8be0aea (diff) | |
Unpack exception cause chain to see real reason and not wrapper
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/java/com/it_jaros/jns/scan/ExceptionInfo.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/it_jaros/jns/scan/ExceptionInfo.java b/src/main/java/com/it_jaros/jns/scan/ExceptionInfo.java index b732c9c..cdbf741 100644 --- a/src/main/java/com/it_jaros/jns/scan/ExceptionInfo.java +++ b/src/main/java/com/it_jaros/jns/scan/ExceptionInfo.java @@ -5,6 +5,11 @@ public record ExceptionInfo( String message ) { public static ExceptionInfo from(Throwable t) { + Throwable cause = t.getCause(); + if (cause != null) { + return ExceptionInfo.from(cause); + } + return new ExceptionInfo( t.getClass().getName(), t.getMessage() |
