public final class ThrowableHandler extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ThrowableHandler.Type
Container for throwable types.
|
| Modifier and Type | Field and Description |
|---|---|
protected static List<ThrowableListener> |
listeners
The list of listeners
|
| Constructor and Description |
|---|
ThrowableHandler() |
| Modifier and Type | Method and Description |
|---|---|
static void |
add(int type,
Throwable t)
Add a throwable that is to be handled.
|
static void |
add(Throwable t)
Add a throwable that is to be handled with unknown type.
|
static void |
addError(Throwable t)
Add a throwable that is to be handled with error type.
|
static void |
addThrowableListener(ThrowableListener listener)
Add a ThrowableListener to the listener list.
|
static void |
addWarning(Throwable t)
Add a throwable that is to be handled with warning type.
|
protected static void |
fireOnThrowable(int type,
Throwable t)
Fire onThrowable to all registered listeners.
|
static void |
removeThrowableListener(ThrowableListener listener)
Remove a ThrowableListener from the listener list.
|
protected static List<ThrowableListener> listeners
public static void addThrowableListener(ThrowableListener listener)
listener - ThrowableListener to add to the list.public static void removeThrowableListener(ThrowableListener listener)
listener - ThrowableListener to remove from the list.protected static void fireOnThrowable(int type,
Throwable t)
type - The type off the throwable.t - Throwablepublic static void add(int type,
Throwable t)
type - The type off the throwable.t - Throwable to be handled.public static void add(Throwable t)
t - Throwable to be handled.public static void addError(Throwable t)
t - Throwable to be handled.public static void addWarning(Throwable t)
t - Throwable to be handled.Copyright © 2015 JBoss by Red Hat. All rights reserved.