com.microsoft.rightsmanagement.exceptions

Provides a set of classes and enumerations that represent exceptions that occur during RMS operations.

In this section

CommunicationException class

Thrown when the device has no connection to the internet.

DeviceRejectedException class

Implements a device rejected exception passed from the server.

DnsLookupException class

Thrown when the SDK has received an invalid DNS lookup message.

FailedAuthenticationException class

Signals that authentication failure has occurred. Extends the ProtectionException class.

GeneralException class

A general exception used to wrap exceptions with a simplified error message. Extends the ProtectionException class.

This exception will prompt you, stating that an error has occurred and allowing you to send logging information to the Rights Management Service.

InvalidCertificateException class

Thrown when the SDK has received an invalid certificate. Extends the ProtectionException class.

InvalidParameterException class

Signals an invalid parameter exception has occurred. Extends the ProtectionException class.

This exception will prompt you, stating that an error has occurred and allowing you to send logging information to the Rights Management Service.

InvalidPLException class

Thrown when the publishing license that was supplied is corrupted. Extends the ProtectionException class.

This exception will prompt you, stating that an error has occurred and allowing you to send logging information to the Rights Management Service.

NoConsumptionRightsContentRevokedException class

Signals that the user does not have consumption rights over the protected content. Extends the ProtectionException class.

NoConsumptionRightsException class

Signals that the user does not have consumption rights over the protected content. Extends the ProtectionException class.

NoPublishingRightsException class

Thrown when the user rights over the protected content have expired. Extends the ProtectionException class.

OfflineOnlyRequiresInternetException class

Thrown when communication is needed but the OFFLINE_ONLY flag is set in consumption scenarios. Extends the ProtectionException class.

OnPremServersNotSupportedException class

Thrown when the SDK has tried to consume content published by an on-premises server. Extends the ProtectionException class.

ProtectionException class

Signals that a protection exception of some kind has occurred. This class is the general class used for exceptions produced by failed or interrupted RMS operations.

ServiceNotAvailableException class

Implements an exception which is used when a retry can help in solving the error which occurred Extends the ProtectionException class.

RestServiceNotEnabledException class

Thrown if the user has an Office 365 account, but the company has not provisioned or enabled RMSO; or if the company has provisioned RMSO, but has not enabled the REST service for any of the AD RMS clients. Extends the ProtectionException class.

UnsupportedSDKVersionException class

The operation is not supported by the version of the SDK. Extends the ProtectionException class.

UserRightsExpiredException class

Thrown when the user rights over the protected content have expired. Extends the ProtectionException class.

UserCancellationException class

Signals that the user has canceled an operation. Extends the ProtectionException class.

ProtectionExceptionType enum

Maps the numeric error codes in the SDK to the relevant exception type, enabling the developer to check and handle the error code accordingly.