Skip to content

Commit

Permalink
Fix #23920: Wrapped ReportedException don't keep data on bug report
Browse files Browse the repository at this point in the history
git-svn-id: https://josm.openstreetmap.de/svn/trunk@19246 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
taylor.smock committed Oct 17, 2024
1 parent 7cff186 commit 69e5ebb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/org/openstreetmap/josm/tools/bugreport/BugReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ public String getReportText(String header) {
}
if (isIncludeData()) {
exception.printReportDataTo(out);
// Exceptions thrown in threads *may* be automatically wrapped by the thread handler (ForkJoinPool, etc.)
// We want to keep the data saved in the child exceptions, so we print that as well.
Throwable cause = exception.getCause();
while (cause != null) {
if (cause instanceof ReportedException) {
((ReportedException) cause).printReportDataTo(out);
}
cause = cause.getCause();
}
}
exception.printReportStackTo(out);
if (isIncludeAllStackTraces()) {
Expand Down

0 comments on commit 69e5ebb

Please sign in to comment.