UNPKG

1.08 kBJavaScriptView Raw
1"use strict";
2/*
3 * @adonisjs/fold
4 *
5 * (c) Harminder Virk <virk@adonisjs.com>
6 *
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
9 */
10Object.defineProperty(exports, "__esModule", { value: true });
11exports.IocLookupException = void 0;
12const utils_1 = require("@poppinss/utils");
13/**
14 * Raised when unable to lookup a namespace
15 */
16class IocLookupException extends utils_1.Exception {
17 static lookupFailed(namespace) {
18 return new this(`Cannot resolve "${namespace}" namespace from the IoC Container`, 500, 'E_IOC_LOOKUP_FAILED');
19 }
20 /**
21 * Invalid namespace type
22 */
23 static invalidNamespace() {
24 return new this('"Ioc.lookup" accepts a namespace string or a lookup node', 500, 'E_INVALID_IOC_NAMESPACE');
25 }
26 /**
27 * Fake is missing and yet resolved
28 */
29 static missingFake(namespace) {
30 return new this(`Cannot resolve fake for "${namespace}" namespace`, 500, 'E_MISSING_IOC_FAKE');
31 }
32}
33exports.IocLookupException = IocLookupException;