Package com.illumon.iris.console.utils
Enum Class 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 ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoid
<T extends Throwable>
booleanisSuppressed
(Class<T> type, boolean forceAllow) Check if a specific exception type is currently suppressed.newVisualizer
(boolean modal, Throwable... exceptions) Create a new Visualizer that can be used to local error reporting.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
Returns the enum constant of this class with the specified name.static ExceptionVisualizer[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.void
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
-
DEFAULT
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
-