Index: trunk/src/org/openstreetmap/josm/tools/bugreport/BugReport.java =================================================================== --- trunk/src/org/openstreetmap/josm/tools/bugreport/BugReport.java (revision 12766) +++ trunk/src/org/openstreetmap/josm/tools/bugreport/BugReport.java (revision 12770) @@ -7,6 +7,4 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Predicate; - -import org.openstreetmap.josm.actions.ShowStatusReportAction; /** @@ -21,5 +19,5 @@ *
* You should then add some debug information there. This can be the OSM ids that caused the error, information on the data you were working on
- * or other local variables. Make sure that no excpetions may occur while computing the values. It is best to send plain local variables to
+ * or other local variables. Make sure that no exceptions may occur while computing the values. It is best to send plain local variables to
* put(...). If you need to do computations, put them into a lambda expression. Then simply throw the throwable you got from the bug report.
* The global exception handler will do the rest.
@@ -117,13 +115,14 @@
/**
* Gets the full string that should be send as error report.
+ * @param header header text for the error report
* @return The string.
* @since 10585
*/
- public String getReportText() {
+ public String getReportText(String header) {
StringWriter stringWriter = new StringWriter();
PrintWriter out = new PrintWriter(stringWriter);
if (isIncludeStatusReport()) {
try {
- out.println(ShowStatusReportAction.getReportHeader());
+ out.println(header);
} catch (RuntimeException e) { // NOPMD
out.println("Could not generate status report: " + e.getMessage());
Index: trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportQueue.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportQueue.java (revision 12766)
+++ trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportQueue.java (revision 12770)
@@ -2,12 +2,9 @@
package org.openstreetmap.josm.tools.bugreport;
-import java.awt.GraphicsEnvironment;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.function.BiFunction;
import java.util.function.Predicate;
-import org.openstreetmap.josm.gui.bugreport.BugReportDialog;
import org.openstreetmap.josm.tools.Logging;
@@ -21,13 +18,31 @@
private static final BugReportQueue INSTANCE = new BugReportQueue();
+ public static final BugReportHandler FALLBACK_BUGREPORT_HANDLER = (e, index) -> {
+ e.printStackTrace();
+ return BugReportQueue.SuppressionMode.NONE;
+ };
+
private final LinkedList