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.

39 lines 1.14 kB
/** * @module Utilities */ /** * * IMPORT_PATH: `"@daiso-tech/core/utilities"` * @group Errors */ export class FactoryError extends Error { constructor(message, cause) { super(message, { cause }); this.name = FactoryError.name; } } /** * The error occurs when attempting to access the default adapter of the `Factory` class instance, which has not been defined. * * IMPORT_PATH: `"@daiso-tech/core/utilities"` * @group Errors */ export class DefaultAdapterNotDefinedError extends FactoryError { constructor(factoryName) { super(`Default adapter not set for factory "${factoryName}"`); this.name = DefaultAdapterNotDefinedError.name; } } /** * The error occurs when attempting to access the an adapter of the `Factory` class instance, which has not been registered. * * IMPORT_PATH: `"@daiso-tech/core/utilities"` * @group Errors */ export class UnregisteredAdapterError extends FactoryError { constructor(adapterName) { super(`Unregistered adapter "${adapterName}"`); this.name = UnregisteredAdapterError.name; } } //# sourceMappingURL=errors.js.map