org.apache.oozie
Class XException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.oozie.XException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AuthorizationException, BaseEngineException, BundleJobException, CommandException, CoordinatorJobException, CredentialException, JPAExecutorException, ParameterVerifierException, PreconditionException, ServiceException, StoreException, URIHandlerException, WorkflowException
public class XException
- extends Exception
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.
- See Also:
- Serialized Form
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. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
XException
public XException(XException cause)
- Create an XException from a XException.
- Parameters:
cause
- the XException cause.
XException
public XException(ErrorCode errorCode,
Object... params)
- Create an EXception from an error code plus parameter to create the exception message. 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.
- Parameters:
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.
getErrorCode
public ErrorCode getErrorCode()
- Return the error code of the exception.
- Returns:
- exception error code.
Copyright © 2013 Apache Software Foundation. All Rights Reserved.