Package com.illumon.iris.console.utils
Enum ExceptionVisualizer
- All Implemented Interfaces:
com.fishlib.util.process.FatalErrorReporter.Interceptor
,Serializable
,Comparable<ExceptionVisualizer>
,java.lang.constant.Constable
,Thread.UncaughtExceptionHandler
public enum ExceptionVisualizer extends Enum<ExceptionVisualizer> implements Thread.UncaughtExceptionHandler, com.fishlib.util.process.FatalErrorReporter.Interceptor
This class provides a means to queue up exceptions and display them to a user. If the GUI is visible when new
exceptions are added, they are added to the existing GUI's list. This also provides for suppression of exception
causes, and sending support requests.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ExceptionVisualizer.Visualizer
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULT
-
Method Summary
Modifier and Type Method Description ErrorReporter
asErrorReporter()
void
intercept(String message, Throwable throwable)
<T extends Throwable>
booleanisSuppressed(Class<T> type, boolean forceAllow)
Check if a specific exception type is currently suppressed.ExceptionVisualizer.Visualizer
newVisualizer(boolean modal, Throwable... exceptions)
Create a new Visualizer that can be used to local error reporting.ExceptionVisualizer.Visualizer
newVisualizer(boolean modal, Collection<Throwable> exceptions)
Create a new Visualizer that can be used to local error reporting.void
uncaughtException(Thread t, Throwable e)
static ExceptionVisualizer
valueOf(String name)
Returns the enum constant of this type with the specified name.static ExceptionVisualizer[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.void
visualize(Throwable t, boolean fatal, boolean blocking)
Visualize the supplied exception.void
visualize(Throwable t, boolean fatal, boolean blocking, ZonedDateTime time, Thread thread)
Visualize the supplied exception.void
visualize(Throwable t, boolean fatal, boolean blocking, ZonedDateTime time, Thread thread, Component source)
Visualize the supplied exception.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isSuppressed
Check if a specific exception type is currently suppressed.- Type Parameters:
T
- Something that extendsThrowable
- Parameters:
type
- The exception to check for suppressionforceAllow
- forces type suppression to be allowed- Returns:
- true if the exception is currently suppressed.
-
visualize
Visualize the supplied exception.
This will use the current time and thread as display details
- Parameters:
t
- The exception to visualizeblocking
- If true, this method will not return until the user closes the dialog
-
visualize
public void visualize(Throwable t, boolean fatal, boolean blocking, ZonedDateTime time, Thread thread)Visualize the supplied exception.
This will use the current time and thread as display details
- Parameters:
t
- The exception to visualizeblocking
- If true, this method will not return until the user closes the dialogtime
- The time the exception occuredthread
- The thread the exeception occured on
-
visualize
public void visualize(Throwable t, boolean fatal, boolean blocking, ZonedDateTime time, Thread thread, Component source)Visualize the supplied exception.
This will use the current time and thread as display details
- Parameters:
t
- The exception to visualizeblocking
- If true, this method will not return until the user closes the dialogtime
- The time the exception occuredthread
- The thread the exeception occured onsource
- The source component to center the GUI on.
-
newVisualizer
public ExceptionVisualizer.Visualizer newVisualizer(boolean modal, Collection<Throwable> exceptions)Create a new Visualizer that can be used to local error reporting. This method does not need to be invoked on the swing thread.- Parameters:
modal
- If the dialog should be modalexceptions
- The set of exceptions to visualize.- Returns:
- The visualizer. Users should invoke
Dialog.setVisible(boolean)
to show the dialog.
-
newVisualizer
Create a new Visualizer that can be used to local error reporting. This method does not need to be invoked on the swing thread.- Parameters:
modal
- If the dialog should be modalexceptions
- The set of exceptions to visualize.- Returns:
- The visualizer. Users should invoke
Dialog.setVisible(boolean)
to show the dialog.
-
uncaughtException
- Specified by:
uncaughtException
in interfaceThread.UncaughtExceptionHandler
-
intercept
- Specified by:
intercept
in interfacecom.fishlib.util.process.FatalErrorReporter.Interceptor
-
asErrorReporter
-