Class DrmTodayException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.castlabs.android.drm.DrmTodayException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DrmException

public class DrmTodayException extends Exception
Use this Exception class to report any errors from DrmToday services. The exception is initialized with an error code which is one of: ERROR_NOT_AUTHORIZED, ERROR_INVALID_REQUEST, ERROR_KEY_NOT_FOUND, ERROR_PROVISIONING_FAILED, ERROR_TOO_MANY_CONCURRENT_SESSIONS, or ERROR_UNKNOWN.
See Also:
  • Field Details

    • ERROR_UNKNOWN

      public static final int ERROR_UNKNOWN
      Error indicating a general error
      See Also:
    • ERROR_INVALID_REQUEST

      public static final int ERROR_INVALID_REQUEST
      Error indicating an invalid request that was rejected by the server
      See Also:
    • ERROR_NOT_AUTHORIZED

      public static final int ERROR_NOT_AUTHORIZED
      Error indicating an unauthorized request
      See Also:
    • ERROR_KEY_NOT_FOUND

      public static final int ERROR_KEY_NOT_FOUND
      Error indicating that the requested content was not found
      See Also:
    • 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:
    • ERROR_PROVISIONING_FAILED

      public static final int ERROR_PROVISIONING_FAILED
      Error indicating that the provisioning request failed. Error of this type can also have an IOException as cause.
      See Also:
    • ERROR_TOO_MANY_CONCURRENT_SESSIONS

      public static final int ERROR_TOO_MANY_CONCURRENT_SESSIONS
      Error raised when DRMtoday refuses license renewal due to too many open sessions
      See Also:
    • ERROR_DEVICE_TIME

      public static final int ERROR_DEVICE_TIME
      A device time error occurred
      See Also:
    • ERROR_WIDEVINE_DEV_CERTIFICATE_REVOKED

      public static final int ERROR_WIDEVINE_DEV_CERTIFICATE_REVOKED
      A device's Widevine certificate was revoked
      See Also:
  • Constructor Details

    • DrmTodayException

      public DrmTodayException(@NonNull String message, int errorCode)
      Create a new instance with the given message and error errorCode
      Parameters:
      message - the error message
      errorCode - the error errorCode
    • DrmTodayException

      public DrmTodayException(@NonNull String message, int errorCode, @Nullable String customMessage)
      Create a new instance with the given message and error errorCode
      Parameters:
      message - the error message
      errorCode - the error errorCode
      customMessage - the custom message
    • DrmTodayException

      public DrmTodayException(@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 errorCode
      cause - the cause
    • DrmTodayException

      public DrmTodayException(@NonNull String message, int errorCode, @Nullable String customMessage, @Nullable String customCode, Throwable cause)
  • Method Details