Changeset 19246 in josm


Ignore:
Timestamp:
2024-10-17T15:29:50+02:00 (19 hours ago)
Author:
taylor.smock
Message:

Fix #23920: Wrapped ReportedException don't keep data on bug report

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/bugreport/BugReport.java

    r19112 r19246  
    160160        if (isIncludeData()) {
    161161            exception.printReportDataTo(out);
     162            // Exceptions thrown in threads *may* be automatically wrapped by the thread handler (ForkJoinPool, etc.)
     163            // We want to keep the data saved in the child exceptions, so we print that as well.
     164            Throwable cause = exception.getCause();
     165            while (cause != null) {
     166                if (cause instanceof ReportedException) {
     167                    ((ReportedException) cause).printReportDataTo(out);
     168                }
     169                cause = cause.getCause();
     170            }
    162171        }
    163172        exception.printReportStackTo(out);
Note: See TracChangeset for help on using the changeset viewer.