org.cyberlab.support.exception
Class CollectExceptions
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.cyberlab.support.exception.CollectExceptions
- All Implemented Interfaces:
- java.io.Serializable, ExceptionHandler
public class CollectExceptions
- extends java.lang.Exception
- implements ExceptionHandler
Exception helper class to collect a train of exceptions in order to correctly represent the exception
stack with the "causing" exception on top of the stack. This should allow for more accurate and effective debugging.
- Author:
- Mats-Gøran Karlsen
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CollectExceptions
public CollectExceptions()
handle
public void handle(java.lang.String errorMessage,
java.lang.Exception e)
- Description copied from interface:
ExceptionHandler
- The exception handle method
- Specified by:
handle
in interface ExceptionHandler
- Parameters:
errorMessage
- A string containig the cause of the error.e
- The exception thrown.
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in class java.lang.Throwable
getStackTrace
public java.lang.StackTraceElement[] getStackTrace()
- Overrides:
getStackTrace
in class java.lang.Throwable
containsErrors
public boolean containsErrors()