1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var tslib_1 = require("tslib");
|
4 | var index_1 = require("../index");
|
5 |
|
6 |
|
7 |
|
8 | var RepositoryNotFoundError = (function (_super) {
|
9 | tslib_1.__extends(RepositoryNotFoundError, _super);
|
10 | function RepositoryNotFoundError(connectionName, entityClass) {
|
11 | var _this = _super.call(this) || this;
|
12 | _this.name = "RepositoryNotFoundError";
|
13 | Object.setPrototypeOf(_this, RepositoryNotFoundError.prototype);
|
14 | var targetName;
|
15 | if (entityClass instanceof index_1.EntitySchema) {
|
16 | targetName = entityClass.options.name;
|
17 | }
|
18 | else if (typeof entityClass === "function") {
|
19 | targetName = entityClass.name;
|
20 | }
|
21 | else {
|
22 | targetName = entityClass;
|
23 | }
|
24 | _this.message = "No repository for \"" + targetName + "\" was found. Looks like this entity is not registered in " +
|
25 | ("current \"" + connectionName + "\" connection?");
|
26 | return _this;
|
27 | }
|
28 | return RepositoryNotFoundError;
|
29 | }(Error));
|
30 | exports.RepositoryNotFoundError = RepositoryNotFoundError;
|
31 |
|
32 |
|