org.apache.geode.management.cli

## Class CommandProcessingException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.apache.geode.management.cli.CommandProcessingException

- All Implemented Interfaces:
    java.io.Serializable

      public class CommandProcessingException
      extends java.lang.RuntimeException

  Indicates that an exception occurred while processing a GemFire Command Line Interface (CLI) command. The exception may be thrown because of:
  - parsing errors from unknown parameters
  - errors from invalid values for parameters
  Since:
    GemFire 7.0
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ARGUMENT_INVALID` Error Type indicating an invalid parameter of a command.
    `static int` | `COMMAND_INVALID` Error Type indicating an invalid command
    `static int` | `COMMAND_INVALID_OR_UNAVAILABLE` Error Type indicating an unknown or unavailable command.
    `static int` | `COMMAND_NAME_AMBIGUOUS` Error Type indicating an ambiguous command name
    `static int` | `OPTION_INVALID` Error Type indicating an invalid named parameter of a command.
    `static int` | `OPTION_VALUE_INVALID` Error Type indicating an invalid value for a parameter of a command.
    `static int` | `OPTION_VALUE_REQUIRED` Error Type indicating the absence of value for named parameter of a command.
    `static int` | `REQUIRED_ARGUMENT_MISSING` Error Type indicating the absence of a mandatory parameter of a command.
    `static int` | `REQUIRED_OPTION_MISSING` Error Type indicating the absence of a mandatory named parameter of a command.
    `static int` | `RESOURCE_ACCESS_ERROR` Error Type indicating IO errors occurred while accessing File/Network resource

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommandProcessingException(java.lang.String message, int errorType, java.lang.Object errorData)` Constructs a new `CommandProcessingException`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getErrorData()` Returns the error data.
    `int` | `getErrorType()` Returns the Error Type.
    `java.lang.String` | `toString()` Returns the String representation of this `CommandProcessingException```

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### COMMAND_INVALID

          public static int COMMAND_INVALID

      Error Type indicating an invalid command

    - #### COMMAND_NAME_AMBIGUOUS

          public static int COMMAND_NAME_AMBIGUOUS

      Error Type indicating an ambiguous command name

    - #### COMMAND_INVALID_OR_UNAVAILABLE

          public static int COMMAND_INVALID_OR_UNAVAILABLE

      Error Type indicating an unknown or unavailable command. GemFire CLI Commands are context sensitive & might not be always available.

    - #### OPTION_INVALID

          public static int OPTION_INVALID

      Error Type indicating an invalid named parameter of a command.

    - #### ARGUMENT_INVALID

          public static int ARGUMENT_INVALID

      Error Type indicating an invalid parameter of a command.

    - #### OPTION_VALUE_INVALID

          public static int OPTION_VALUE_INVALID

      Error Type indicating an invalid value for a parameter of a command.

    - #### REQUIRED_OPTION_MISSING

          public static int REQUIRED_OPTION_MISSING

      Error Type indicating the absence of a mandatory named parameter of a command.

    - #### REQUIRED_ARGUMENT_MISSING

          public static int REQUIRED_ARGUMENT_MISSING

      Error Type indicating the absence of a mandatory parameter of a command.

    - #### OPTION_VALUE_REQUIRED

          public static int OPTION_VALUE_REQUIRED

      Error Type indicating the absence of value for named parameter of a command.

    - #### RESOURCE_ACCESS_ERROR

          public static int RESOURCE_ACCESS_ERROR

      Error Type indicating IO errors occurred while accessing File/Network resource

  - ### Constructor Detail

    - #### CommandProcessingException

          public CommandProcessingException(java.lang.String message,
                                            int errorType,
                                            java.lang.Object errorData)

      Constructs a new `CommandProcessingException`
      Parameters:
        `message` - The error detail message.
        `errorType` - One of the error types defined in `CommandProcessingException`
        `errorData` - Additional information about the error.

  - ### Method Detail

    - #### getErrorType

          public int getErrorType()

      Returns the Error Type.

    - #### getErrorData

          public java.lang.Object getErrorData()

      Returns the error data.

    - #### toString

          public java.lang.String toString()

      Returns the String representation of this `CommandProcessingException```
      Overrides:
        `toString` in class `java.lang.Throwable`