gnodet commented on code in PR #3590:
URL: https://github.com/apache/maven-surefire/pull/3590#discussion_r4792310661
##########
surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java:
##########
@@ -207,11 +207,24 @@ private static String causeToString(Throwable cause,
StackTraceFilter filter) {
while (cause != null) {
resp.append("Caused by: ");
resp.append(toString(cause, asList(cause.getStackTrace()),
filter));
+ resp.append(suppressedToString(cause, filter));
Review Comment:
**Excellent addition - ensures suppressed exceptions in cause chain are
shown**
This line ensures that when processing the cause chain, we also show any
suppressed exceptions attached to each cause. This is important because:
1. A cause in the chain might have its own suppressed exceptions (e.g., from
try-with-resources cleanup)
2. It maintains consistency with Java's standard printStackTrace output
3. It completes the picture when `trimStackTrace=true` is used
The placement here is correct - it shows suppressed exceptions after the
cause's own stack trace but before moving to the next cause in the chain.
_Claude Code on behalf of Guillaume Nodet_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]