Package org.apache.hadoop.lib.lang
Class XException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.hadoop.lib.lang.XException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FileSystemAccessException,ServerException
Generic exception that requires error codes and uses the a message
template from the error code.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface to define error codes. -
Constructor Summary
ConstructorsConstructorDescriptionXException(XException cause) Creates an XException using another XException as cause.XException(XException.ERROR error, Object... params) Creates an XException using the specified error code. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
XException
Creates an XException using another XException as cause.The error code and error message are extracted from the cause.
- Parameters:
cause- exception cause.
-
XException
Creates an XException using the specified error code. The exception message is resolved using the error code template and the passed parameters.- Parameters:
error- error code for the XException.params- parameters to use when creating the error message with the error code template.
-
-
Method Details
-
getError
Returns the error code of the exception.- Returns:
- the error code of the exception.
-