Package com.castlabs.android.drm

# Class DrmException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.castlabs.android.drm.DrmException

All Implemented Interfaces:
  `Serializable`

public class DrmException extends Exception
Represents an exception that occurred during a DRM operation.

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static @interface`
  `DrmException.ErrorCode`
  Annotation interface for error codes used in DrmException.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `ERROR_IO_ERROR`
  Error indicating that an IO error occurred during the license request.
  `static final int`
  `ERROR_PROVISIONING_FAILED`
  Error indicating that the provisioning request failed.
  `static final int`
  `ERROR_UNKNOWN`
  Error indicating a general error

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DrmException(String message, int errorCode, Throwable cause)`
  Create a new instance with the given message and error errorCode

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getErrorCode()`
  Returns the error code of this exception.

  ### 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`

- ## Field Details

  - ### ERROR_UNKNOWN

    public static final int ERROR_UNKNOWN
    Error indicating a general error
    See Also:
      - Constant Field Values

  - ### ERROR_IO_ERROR

    public static final int ERROR_IO_ERROR
    Error indicating that an IO error occurred during the license request. This cause of this exception will be an `IOException`
    See Also:
      - Constant Field Values

  - ### ERROR_PROVISIONING_FAILED

    public static final int ERROR_PROVISIONING_FAILED
    Error indicating that the provisioning request failed.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### DrmException

    public DrmException(@NonNull String message, int errorCode, Throwable cause)
    Create a new instance with the given message and error errorCode
    Parameters:
      `message` - the error message
      `errorCode` - the error code
      `cause` - the cause

- ## Method Details

  - ### getErrorCode

    public int getErrorCode()
    Returns the error code of this exception.
    Returns:
      The error code.