public class XException extends Exception
It requires error codes an captures the Log info at exception time.
Error codes should be modeled in subclasses as Enums.
| Constructor and Description | 
|---|
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. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
ErrorCode | 
getErrorCode()
Return the error code of the exception. 
 | 
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic 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.public ErrorCode getErrorCode()
Copyright © 2016 Apache Software Foundation. All rights reserved.