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.

49 lines 1.16 kB
/** * @module Cache */ /** * * IMPORT_PATH: `"@daiso-tech/core/cache/contracts"` * @group Errors */ export class CacheError extends Error { constructor(message, cause) { super(message, { cause }); this.name = CacheError.name; } } /** * The error is thrown when attempting to increment or decrement a key that is not of number type. * * IMPORT_PATH: `"@daiso-tech/core/cache/contracts"` * @group Errors */ export class TypeCacheError extends CacheError { constructor(message, cause) { super(message, { cause }); this.name = TypeCacheError.name; } } /** * The error is thrown when a key is not found * * IMPORT_PATH: `"@daiso-tech/core/cache/contracts"` * @group Errors */ export class KeyNotFoundCacheError extends CacheError { constructor(message, cause) { super(message, { cause }); this.name = KeyNotFoundCacheError.name; } } /** * * IMPORT_PATH: `"@daiso-tech/core/cache/contracts"` * @group Errors */ export const CACHE_ERRORS = { Base: CacheError, Type: TypeCacheError, KeyNotFound: KeyNotFoundCacheError, }; //# sourceMappingURL=cache.errors.js.map