|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents the responsibilities of an exception delegate in the Carbon Core exception subsystem. This system provide a simple functionality for providing special handling during the throwing of exceptions by replacing the delegate and what it does.
The contract for ExceptionDelegate
implementation's is that
they should expect to have ever set method called except the cause which is
optional. Once that is done, the handle exception method will be called in
order to allow the delegate to do any special handling or notifications it
likes.
Method Summary | |
Throwable |
getCause()
Retrieves the reason thsi failed. |
Throwable |
getDelegatee()
Gets the delegatee, or the exception object that is being managed by this delegate. |
Class |
getExceptionSource()
The location that this exception was created. |
String |
getMessage()
Gets the message for this exception. |
SeverityEnum |
getSeverity()
Retrieves the harshness or how serious this failure is. |
void |
handleException()
This method is called once the object is fully populated and can handle this method in many different ways such as logging it. |
void |
setCause(Throwable cause)
Sets the previous exception that caused this failure to happen. |
void |
setDelegatee(Throwable delegatee)
Sets the throwable which is requesting the creation of this delegate. |
void |
setExceptionSource(Class exceptionSource)
Sets the location that this exception occurred.. |
void |
setMessage(String message)
Sets the string explanation of this exception. |
void |
setSeverity(SeverityEnum severity)
Sets the harshness or how serious this failure is. |
Method Detail |
public void setDelegatee(Throwable delegatee)
delegatee
- the delegatee this delegate is working forpublic Throwable getDelegatee()
public void setMessage(String message)
message
- The string explanation of this exceptionpublic String getMessage()
public void setCause(Throwable cause)
cause
- the previous failurepublic Throwable getCause()
public void setExceptionSource(Class exceptionSource)
exceptionSource
- the location this exception was thrownpublic Class getExceptionSource()
public void setSeverity(SeverityEnum severity)
severity
- the seriousness of the failurepublic SeverityEnum getSeverity()
public void handleException()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |