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

@Private public class XException extends Exception
Generic exception that requires error codes and uses the a message template from the error code.
See Also:
  • Constructor Details

    • XException

      public XException(XException cause)
      Creates an XException using another XException as cause.

      The error code and error message are extracted from the cause.

      Parameters:
      cause - exception cause.
    • XException

      public XException(XException.ERROR error, Object... params)
      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

      public XException.ERROR getError()
      Returns the error code of the exception.
      Returns:
      the error code of the exception.