|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--org.sape.carbon.core.exception.BaseException
This is an abstract, base exception class provided within the Carbon Core to support basic exception functionality. This includes the tracking of cause, severity and the source of an exception as well as a string message.
Exceptions that subclass this one will attempt to log on creation when utilizing the default ExceptionDelegate. Other ExceptionDelegates may be configured by setting the carbon.exceptiondelegate system property.
Copyright 2002 Sapient
Field Summary | |
protected ExceptionDelegate |
delegatedException
The implementing exception delegate that provides Carbon Core exceptions with their basic functionality. |
Fields inherited from class java.lang.Exception |
|
Fields inherited from class java.lang.Throwable |
|
Constructor Summary | |
BaseException(Class sourceClass,
String message)
Constructs an exception with the provided source and message |
|
BaseException(Class sourceClass,
String message,
Throwable cause)
Constructs an exception with the provided source, message and cause |
Method Summary | |
Throwable |
getCause()
calls getPreviousException on the delegated exception |
Class |
getExceptionSource()
This method will normall return the supplied source of an exception, but may be overridden to always supply the class of the exception. |
String |
getMessage()
calls getMessage on the delegated exception |
abstract SeverityEnum |
getSeverity()
This method must be overriden by subclasses so that they may declare their severity |
String |
toString()
calls toString on the delegated exception |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected ExceptionDelegate delegatedException
Constructor Detail |
public BaseException(Class sourceClass, String message)
sourceClass
- The source class of this exceptionmessage
- string information relating to this exceptionpublic BaseException(Class sourceClass, String message, Throwable cause)
sourceClass
- The source class of this exceptionmessage
- string information relating to this exceptioncause
- a throwable that can be considered the cause
of the current exception (used in levelizing exceptions)Method Detail |
public abstract SeverityEnum getSeverity()
getSeverity
in interface Exceptionable
public Class getExceptionSource()
getExceptionSource
in interface Exceptionable
public Throwable getCause()
getCause
in interface Exceptionable
getCause
in class Throwable
public String toString()
toString
in class Throwable
public String getMessage()
getMessage
in class Throwable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |