UNPKG

@microfleet/ioredis-lock

Version:

Node distributed locking using redis with ioredis adapter

49 lines 1.16 kB
/** * Contains the potential errors thrown by a lock. */ /** * The constructor for a LockAcquisitionError. Thrown or returned when a lock * could not be acquired. * * @constructor * @extends Error * * @param {string} message The message to assign the error */ export class LockAcquisitionError extends Error { constructor(message) { super(message); this.name = 'LockAcquisitionError'; } } /** * The constructor for a LockReleaseError. Thrown or returned when a lock * could not be released. * * @constructor * @extends Error * * @param {string} message The message to assign the error */ export class LockReleaseError extends Error { constructor(message) { super(message); this.name = 'LockReleaseError'; } } /** * The constructor for a LockExtendError. Thrown or returned when a lock * could not be extended. * * @constructor * @extends Error * * @param {string} message The message to assign the error */ export class LockExtendError extends Error { constructor(message) { super(message); this.name = 'LockExtendError'; } } //# sourceMappingURL=errors.js.map