@adonisjs/fold
Version:
Dependency manager and IoC container for your next NodeJs application
34 lines (33 loc) • 1.08 kB
JavaScript
/*
* @adonisjs/fold
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.IocLookupException = void 0;
const utils_1 = require("@poppinss/utils");
/**
* Raised when unable to lookup a namespace
*/
class IocLookupException extends utils_1.Exception {
static lookupFailed(namespace) {
return new this(`Cannot resolve "${namespace}" namespace from the IoC Container`, 500, 'E_IOC_LOOKUP_FAILED');
}
/**
* Invalid namespace type
*/
static invalidNamespace() {
return new this('"Ioc.lookup" accepts a namespace string or a lookup node', 500, 'E_INVALID_IOC_NAMESPACE');
}
/**
* Fake is missing and yet resolved
*/
static missingFake(namespace) {
return new this(`Cannot resolve fake for "${namespace}" namespace`, 500, 'E_MISSING_IOC_FAKE');
}
}
exports.IocLookupException = IocLookupException;
;