Skip to main content

LcpError

message is plain English, fit to show a user. To word or translate it yourself, switch on code and use the details, e.g. date for the license-status codes.

Extends​

  • Error

Implements​

Constructors​

Constructor​

new LcpError(code, details?): LcpError;

Parameters​

ParameterType
codeLcpErrorCode
detailsLcpErrorDetails

Returns​

LcpError

Overrides​

Error.constructor

Properties​

code​

readonly code: LcpErrorCode;

date?​

readonly optional date?: Date;

When the license's status changed, or when it starts or expired.

Implementation of​

LcpErrorDetails.date


devicesCount?​

readonly optional devicesCount?: number;

For licenseRevoked: how many devices had registered the license.

Implementation of​

LcpErrorDetails.devicesCount


maxRenewDate?​

readonly optional maxRenewDate?: Date;

For invalidRenewalPeriod: the latest end date a renewal can ask for.

Implementation of​

LcpErrorDetails.maxRenewDate


detail?​

readonly optional detail?: string;

Readium's own description of the error, for logs; not meant for users.

Implementation of​

LcpErrorDetails.detail