public class ErrorLogger
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ErrorLogger.ErrorLoggerRunnable
Helper class for transferring error displays to the GUI dispatch thread.
|
Modifier and Type | Field and Description |
---|---|
static int |
CLOSED_OPTION
Return value from class method if user closes window without selecting
anything, more than likely this should be treated as a
NO_OPTION . |
static int |
HELP_OPTION
Return value from class method if HELP is chosen.
|
static int |
NO_OPTION
Return value from class method if NO is chosen.
|
static int |
YES_OPTION
Return value from class method if YES is chosen.
|
Modifier and Type | Method and Description |
---|---|
static void |
reportError(java.lang.Object parentWidget,
java.lang.String msg)
Report an error message to the user, using the GUI if available.
|
static void |
reportError(java.lang.Object parentWidget,
java.lang.String msg,
boolean dontBlock)
Report an error message to the user, using the GUI if available.
|
static void |
reportError(java.lang.Object parentWidget,
java.lang.Throwable ex,
java.lang.String msg)
Report an error message to the user, using the GUI if available.
|
static int |
reportErrorWithResponse(java.lang.Object parentWidget,
java.lang.Throwable ex,
java.lang.String msg,
java.lang.String bodyText)
Display a standard error message dialog for a stack trace that asks for a yes/no confirmation.
|
static void |
setGraphicalErrorLogger(GraphicalErrorLogger gel)
Register the graphical error logger for this UI.
|
public static final int YES_OPTION
public static final int NO_OPTION
public static final int HELP_OPTION
public static final int CLOSED_OPTION
NO_OPTION
.public static void setGraphicalErrorLogger(GraphicalErrorLogger gel)
gel
- GraphicalErrorLogger implementation to use for displaying error messagespublic static void reportError(java.lang.Object parentWidget, java.lang.Throwable ex, java.lang.String msg)
parentWidget
- GUI component to locate the popup dialogex
- Throwable that caused the error being reportedmsg
- text String to display in dialogpublic static void reportError(java.lang.Object parentWidget, java.lang.String msg)
parentWidget
- GUI component to locate the popup dialogmsg
- text String to display in dialogpublic static void reportError(java.lang.Object parentWidget, java.lang.String msg, boolean dontBlock)
parentWidget
- GUI component to locate the popup dialogmsg
- text String to display in dialogdontBlock
- boolean true if dialog should not block access to other windows (or cause stack overflow if more
errors are reported)public static int reportErrorWithResponse(java.lang.Object parentWidget, java.lang.Throwable ex, java.lang.String msg, java.lang.String bodyText)
parentWidget
- widget that asked the dialog to be displayed (may be null)ex
- Throwable being reported (or null)msg
- localized title string to display in dialogbodyText
- optional extra text String to display before stack trace, or nullYES_OPTION
,
NO_OPTION
,
HELP_OPTION
,
CLOSED_OPTION