Class BugReportQueue
java.lang.Object
org.openstreetmap.josm.tools.bugreport.BugReportQueue
This class handles the display of the bug report dialog.
- Since:
- 10819
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classstatic interfaceClass that handles reporting a bug to the user.static enumThe suppression mode that should be used after the dialog was closed. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BugReportQueue.BugReportHandlerprivate intprivate Threadstatic final BugReportQueue.BugReportHandlerThe fallback bug report handler if none is set.private final CopyOnWriteArrayList<Predicate<ReportedException>>private booleanprivate static final BugReportQueueprivate final LinkedList<ReportedException>private booleanprivate final ArrayList<ReportedException> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBugReportHandler(Predicate<ReportedException> handler) Allows you to peek or even intercept the bug reports.private BugReportQueue.SuppressionModebooleanCheck if the dialog is shown.private intstatic BugReportQueueGets the global bug report queueprivate ReportedExceptiongetNext()private voidvoidsetBugReportHandler(BugReportQueue.BugReportHandler bugReportHandler) Sets theBugReportQueue.BugReportHandlerfor this queue.voidsubmit(ReportedException report) Submit a new error to be displayed
-
Field Details
-
FALLBACK_BUGREPORT_HANDLER
The fallback bug report handler if none is set. Prints the stacktrace on standard error stream.- Since:
- 12770
-
INSTANCE
-
reportsToDisplay
-
suppressAllMessages
-
suppressFor
-
displayThread
-
bugReportHandler
-
handlers
-
displayedErrors
-
inReportDialog
-
-
Constructor Details
-
BugReportQueue
public BugReportQueue()
-
-
Method Details
-
submit
Submit a new error to be displayed- Parameters:
report- The error to display
-
handleDialogResult
-
getNext
- Throws:
InterruptedException
-
displayFor
-
getDisplayedErrors
-
exceptionHandlingInProgress
Check if the dialog is shown. Should only be used for e.g. debugging.- Returns:
trueif the exception handler is still showing the exception to the user.
-
setBugReportHandler
Sets theBugReportQueue.BugReportHandlerfor this queue.- Parameters:
bugReportHandler- the handler in charge of displaying the bug report. Must not be null- Since:
- 12770
-
addBugReportHandler
Allows you to peek or even intercept the bug reports.- Parameters:
handler- The handler. It can return false to stop all further handling of the exception.- Since:
- 10886
-
getInstance
Gets the global bug report queue- Returns:
- The queue
- Since:
- 10886
-