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.

30 lines 1.06 kB
/** * @module ConfigAccessor */ /** * Error thrown when a environment fields are not loaded into memory. * * This error is used to indicate that a environment fields are not loaded into memory. * * @group Errors */ export class UninitializedEnvAccessorError extends Error { /** * Create a new UninitializedEnvAccessorError for a specific field. * * @param field The missing field name or index. * @returns The error instance. */ static create() { return new UninitializedEnvAccessorError("IEnvAccessor must be initialized before use. Call 'init()' before accessing environment fields."); } /** * Note: Do not instantiate `UninitializedEnvAccessorError` directly via the constructor. Use the static `create()` factory method instead. * The constructor remains public only to maintain compatibility with errorPolicy types and prevent type errors. * @internal */ constructor(message, cause) { super(message, { cause }); } } //# sourceMappingURL=env-accessor.errors.js.map