diff --git a/src/org/openstreetmap/josm/tools/bugreport/BugReport.java b/src/org/openstreetmap/josm/tools/bugreport/BugReport.java index 36b376e3b71..a9b33292326 100644 --- a/src/org/openstreetmap/josm/tools/bugreport/BugReport.java +++ b/src/org/openstreetmap/josm/tools/bugreport/BugReport.java @@ -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()) {