com.digi.xbee.api.exceptions

## Class ATCommandException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.digi.xbee.api.exceptions.XBeeException
      - - com.digi.xbee.api.exceptions.CommunicationException
        - - com.digi.xbee.api.exceptions.ATCommandException

- All Implemented Interfaces:
    Serializable

      public class ATCommandException
      extends CommunicationException

  This exception will be thrown when receiving a command response containing a status different than `ATCommandStatus#OK` after sending an XBee AT command.
  See Also:
    `CommunicationException`, `ATCommandStatus`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ATCommandException(ATCommandStatus atCommandStatus)` Creates an `ATCommandException` with the provided `ATCommandStatus` indicating the status of the AT command response and as its error detail message.
    `ATCommandException(String message, ATCommandStatus atCommandStatus)` Creates an `ATCommandException` with the specified message and `ATCommandStatus` indicating the status of the AT command response.
    `ATCommandException(String message, Throwable cause, ATCommandStatus atCommandStatus)` Creates an `ATCommandException` with the specified message, cause and `ATCommandStatus` indicating the status of the AT command response.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ATCommandStatus` | `getCommandStatus()` Returns the `ATCommandStatus` of the exception containing information about the AT command response.
    `String` | `getCommandStatusMessage()` Returns the text containing the status of the AT command response from the exception.
    `String` | `getMessage()`

    - ### Methods inherited from class com.digi.xbee.api.exceptions.XBeeException

      `getCause`

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

      `addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- - ### Constructor Detail

    - #### ATCommandException

          public ATCommandException(ATCommandStatus atCommandStatus)

      Creates an `ATCommandException` with the provided `ATCommandStatus` indicating the status of the AT command response and as its error detail message.
      Parameters:
        `atCommandStatus` - The status of the AT command response.
      See Also:
        `ATCommandStatus`

    - #### ATCommandException

          public ATCommandException(String message,
                            ATCommandStatus atCommandStatus)

      Creates an `ATCommandException` with the specified message and `ATCommandStatus` indicating the status of the AT command response.
      Parameters:
        `message` - The associated message.
        `atCommandStatus` - The status of the AT command response.
      See Also:
        `ATCommandStatus`

    - #### ATCommandException

          public ATCommandException(String message,
                            Throwable cause,
                            ATCommandStatus atCommandStatus)

      Creates an `ATCommandException` with the specified message, cause and `ATCommandStatus` indicating the status of the AT command response.
      Parameters:
        `message` - The associated message.
        `cause` - The cause of this exception.
        `atCommandStatus` - The status of the AT command response.
      See Also:
        `Throwable`, `ATCommandStatus`

  - ### Method Detail

    - #### getCommandStatus

          public ATCommandStatus getCommandStatus()

      Returns the `ATCommandStatus` of the exception containing information about the AT command response.
      Returns:
        The status of the AT command response.
      See Also:
        `ATCommandStatus`

    - #### getCommandStatusMessage

          public String getCommandStatusMessage()

      Returns the text containing the status of the AT command response from the exception.
      Returns:
        The text with the status of the AT command response.

    - #### getMessage

          public String getMessage()

      Overrides:
        `getMessage` in class `Throwable`

© Copyright 2014–2014 Digi International Inc. All rights reserved.