pip-services4-components-node
Version:
Portable Component Model in Node.js / ES2017
23 lines • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReferenceException = void 0;
/** @module refer */
const pip_services4_commons_node_1 = require("pip-services4-commons-node");
const context_1 = require("../context");
/**
* Error when required component dependency cannot be found.
*/
class ReferenceException extends pip_services4_commons_node_1.InternalException {
/**
* Creates an error instance and assigns its values.
*
* @param trace_id (optional) a unique transaction id to trace execution through call chain.
* @param locator the locator to find reference to dependent component.
*/
constructor(context, locator) {
super(context != null ? context_1.ContextResolver.getTraceId(context) : null, "REF_ERROR", "Failed to obtain reference to " + locator);
this.withDetails("locator", locator);
}
}
exports.ReferenceException = ReferenceException;
//# sourceMappingURL=ReferenceException.js.map