|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.duke.cs.banjo.utility.BanjoErrorHandler
Combines the exception handling for various front-end classes.
Details:
- BayesNetExceptions are handled separately, since their special
treatment within our code enables us to provide more detailed
feedback to the user about the potential source of the problem.
- All other exceptions are treated fairly generically.
- Output includes writing the error to the designated error file, as well
as to the command line.
- Note: for exceptions where the associated message provides exhaustive
information, a separate case is listed. Generally, such errors can likely
be "fixed" by the user by correcting some input value, etc.
All other errors are combined in the default case, since they will likely
require developer intervention.
Change History:
Created on Oct 11, 2004
2005/10/20 (v2.0) hjs Add more detail to the error messages.
hjs (v2.1) Add condition around validateData() call, to avoid errors due to bootstrap timing.
Field Summary | |
protected java.lang.StringBuffer |
additionalInfo
|
protected Settings |
processData
|
Constructor Summary | |
BanjoErrorHandler()
|
|
BanjoErrorHandler(Settings _processData)
|
Method Summary | |
java.lang.StringBuffer |
composeErrorClosing()
|
java.lang.StringBuffer |
composeErrorSignature()
|
java.lang.StringBuffer |
displayBasicStackTrace(java.lang.Throwable _exception)
|
void |
handleApplicationException(BanjoException e)
Process any encountered Banjo exception |
void |
handleApplicationException(BanjoException e,
java.lang.Object _additionalInfo)
Process any encountered Banjo exception |
void |
handleGeneralException(java.lang.Exception _exception)
Process any unexpected exception |
void |
handleGeneralException(java.lang.Exception _exception,
java.lang.Object _additionalInfo)
Process any unexpected exception |
void |
handleOutOfMemoryError(java.lang.OutOfMemoryError _exception,
java.lang.Object _additionalInfo)
Process any out-of-memory errors |
private boolean |
validateRequiredData()
Validates the settings values for the BanjoErrorHandler. |
java.lang.Object |
validChoices()
Provides the valid choices for validation relevant to this class |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Settings processData
protected java.lang.StringBuffer additionalInfo
Constructor Detail |
public BanjoErrorHandler()
public BanjoErrorHandler(Settings _processData)
Method Detail |
private boolean validateRequiredData() throws java.lang.Exception
java.lang.Exception
public java.lang.Object validChoices()
public void handleApplicationException(BanjoException e)
e
- The BanjoException to process.public void handleApplicationException(BanjoException e, java.lang.Object _additionalInfo)
e
- The BanjoException to process._additionalInfo
- Additional info, e.g., the settings for the search.public void handleGeneralException(java.lang.Exception _exception)
_exception
- The BanjoException to process.public void handleGeneralException(java.lang.Exception _exception, java.lang.Object _additionalInfo)
_exception
- The BanjoException to process._additionalInfo
- Additional info, e.g., the settings for the search.public void handleOutOfMemoryError(java.lang.OutOfMemoryError _exception, java.lang.Object _additionalInfo)
_exception
- The BanjoException to process._additionalInfo
- Additional info, e.g., the settings for the search.public java.lang.StringBuffer composeErrorSignature()
public java.lang.StringBuffer composeErrorClosing()
public java.lang.StringBuffer displayBasicStackTrace(java.lang.Throwable _exception)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |