de.stefan1200.jts3serverquery

## Class TS3ServerQueryException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - de.stefan1200.jts3serverquery.TS3ServerQueryException

- All Implemented Interfaces:
    Serializable

      public class TS3ServerQueryException
      extends Exception

  TS3ServerQueryException represents an TS3 server query exception and will be used by the JTS3ServerQuery library.
  Since:
    2.0
  Author:
    Stefan Martens
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TS3ServerQueryException(String apiMethodName, String errorID, String errorMessage, String extraErrorMessage, String failedPermissionID)` Only use this constructor to create a new TS3ServerQueryException!

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getApiMethodName()` JTS3ServerQuery method where the exception was thrown.
    `int` | `getErrorID()` Error ID from TS3 server
    `String` | `getErrorMessage()` Error message from TS3 server
    `String` | `getExtraErrorMessage()` Extra error message from TS3 server.
    `int` | `getFailedPermissionID()` Failed permission ID from TS3 server.

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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

    - #### TS3ServerQueryException

          public TS3ServerQueryException(String apiMethodName,
                                         String errorID,
                                         String errorMessage,
                                         String extraErrorMessage,
                                         String failedPermissionID)

      Only use this constructor to create a new TS3ServerQueryException! All values of a TS3 server query error will be saved here.
      Parameters:
        `apiMethodName` - Free text with further information where the exception was thrown. Not important for this exception!
        `errorID` - Always the `id` value of the TS3 server query error!
        `errorMessage` - Always the `msg` value of the TS3 server query error!
        `extraErrorMessage` - Always the `extra_msg` value of the TS3 server query error!
        `failedPermissionID` - Always the `failed_permid` value of the TS3 server query error!

  - ### Method Detail

    - #### getApiMethodName

          public String getApiMethodName()

      JTS3ServerQuery method where the exception was thrown.
      Returns:
        the apiMethodName

    - #### getErrorID

          public int getErrorID()

      Error ID from TS3 server
      Returns:
        the errorID

    - #### getErrorMessage

          public String getErrorMessage()

      Error message from TS3 server
      Returns:
        the errorMessage

    - #### getExtraErrorMessage

          public String getExtraErrorMessage()

      Extra error message from TS3 server. Is `null` in most cases.
      Returns:
        the extraErrorMessage

    - #### getFailedPermissionID

          public int getFailedPermissionID()

      Failed permission ID from TS3 server. Is -1 if a failed permission is not the reason of the error.
      Returns:
        the failedPermissionID