edu.sc.seis.fissuresUtil.exceptionHandler
Interface Extractor

All Known Implementing Classes:
DefaultExtractor

public interface Extractor

Extractor provides a way to extract important information from a Throwable that should be in the exception report, but is either not in the toString, or is difficult to find in the toString. This also allows the GlobalExceptionHandler to not be encombered with alot of exception specific code.


Method Summary
 boolean canExtract(java.lang.Throwable throwable)
          Should return true if this extractor is capable of understanding this type of Throwable.
 java.lang.String extract(java.lang.Throwable throwable)
          Extracts a string version of the throwable.
 java.lang.Throwable getSubThrowable(java.lang.Throwable throwable)
          gets a Wrapped exception, if it exists.
 

Method Detail

canExtract

boolean canExtract(java.lang.Throwable throwable)
Should return true if this extractor is capable of understanding this type of Throwable. Typically, this will be done via code like if (throwable instanceof MyException) { return true; }


extract

java.lang.String extract(java.lang.Throwable throwable)
Extracts a string version of the throwable.


getSubThrowable

java.lang.Throwable getSubThrowable(java.lang.Throwable throwable)
gets a Wrapped exception, if it exists.