UNPKG

@daiso-tech/core

Version:

The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.

58 lines 1.45 kB
/** * @module Lock */ /** * * IMPORT_PATH: `"@daiso-tech/core/lock/contracts"` * @group Errors */ export class LockError extends Error { constructor(message, cause) { super(message, { cause }); } } /** * The error is thrown when trying to acquire a lock that is owned by a different owner. * * IMPORT_PATH: `"@daiso-tech/core/lock/contracts"` * @group Errors */ export class KeyAlreadyAcquiredLockError extends LockError { constructor(message, cause) { super(message, { cause }); } } /** * The error is thrown when trying to release a lock that is owned by a different owner. * * IMPORT_PATH: `"@daiso-tech/core/lock/contracts"` * @group Errors */ export class UnownedReleaseLockError extends LockError { constructor(message, cause) { super(message, { cause }); } } /** * The error is thrown when trying to referesh a lock that is owned by a different owner. * * IMPORT_PATH: `"@daiso-tech/core/lock/contracts"` * @group Errors */ export class UnownedRefreshLockError extends LockError { constructor(message, cause) { super(message, { cause }); } } /** * * IMPORT_PATH: `"@daiso-tech/core/lock/contracts"` * @group Errors */ export const LOCK_ERRORS = { Base: LockError, KeyAlreadyAcquired: KeyAlreadyAcquiredLockError, UnownedRelease: UnownedReleaseLockError, UnownedRefresh: UnownedRefreshLockError, }; //# sourceMappingURL=lock.errors.js.map