|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.apache.oozie.XException
public class XException
Base exception for all Oozie exception.
It requires error codes an captures the Log info at exception time.
Error codes should be modeled in subclasses as Enums.
Constructor Summary | |
---|---|
XException(ErrorCode errorCode,
Object... params)
Create an EXception from an error code plus parameter to create the exception message. |
|
XException(XException cause)
Create an XException from a XException. |
Method Summary | |
---|---|
ErrorCode |
getErrorCode()
Return the error code of the exception. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XException(XException cause)
cause
- the XException cause.public XException(ErrorCode errorCode, Object... params)
The value of ErrorCode.getTemplate()
is used as a StringFormat template for the exception message.
If the last parameter is an Exception it is used as the exception cause.
errorCode
- the error code for the exception.params
- parameters used to create the exception message together with the error code template. If the last
parameter is an Exception it is used as the exception cause.Method Detail |
---|
public ErrorCode getErrorCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |