|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjigcell.compare.impl.ExceptionRecorder
public final class ExceptionRecorder
Provides listening and reporting options for asynchronous exception handling.
This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.
| Field Summary | |
|---|---|
private static int |
CHECK
Flag to cause a checked assertion |
private Compare |
compare
Comparator |
private java.lang.Exception |
exception
The most recent exception we've caught |
private int |
flags
How to handle the received exception |
private static int |
LOG
Flag to log the exception |
private static java.lang.String |
MESSAGE_EXCEPTIONCAUGHT
Error message when an exception is caught |
private static int |
REPORT
Flag to report the exception to the user |
private java.lang.String |
reportMessage
Message to use when reporting an exception |
private static int |
SAVE
Flag to save the exception |
| Constructor Summary | |
|---|---|
ExceptionRecorder(Compare compare,
java.lang.String reportMessage,
boolean save)
Creates a new asynchronous exception handler that reports using the shell handler. |
|
ExceptionRecorder(java.lang.String reportMessage,
boolean check,
boolean log,
boolean save)
Creates a new asynchronous exception handler. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears any exceptions caught by this handler. |
void |
exceptionThrown(java.lang.Exception e)
|
java.lang.Exception |
getLastException()
The last exception caught by this handler. |
boolean |
hasException()
Whether this handler has caught an exception. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int CHECK
private static final int LOG
private static final int REPORT
private static final int SAVE
private static final java.lang.String MESSAGE_EXCEPTIONCAUGHT
private final int flags
private final Compare compare
private java.lang.Exception exception
private final java.lang.String reportMessage
| Constructor Detail |
|---|
public ExceptionRecorder(Compare compare,
java.lang.String reportMessage,
boolean save)
compare - Comparator required for using the shell handlerreportMessage - Message to use when reporting an exceptionsave - Save the most recently caught exception
public ExceptionRecorder(java.lang.String reportMessage,
boolean check,
boolean log,
boolean save)
check - Report the exception using the Comparator assertion handler. There will also be a log message.log - Report the exception using the Comparator log handlersave - Save the most recently caught exception| Method Detail |
|---|
public void clear()
public void exceptionThrown(java.lang.Exception e)
exceptionThrown in interface java.beans.ExceptionListenerpublic java.lang.Exception getLastException()
public boolean hasException()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||