first commit
This commit is contained in:
24
node_modules/@n8n/errors/dist/application.error.js
generated
vendored
Normal file
24
node_modules/@n8n/errors/dist/application.error.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApplicationError = void 0;
|
||||
const callsites_1 = __importDefault(require("callsites"));
|
||||
class ApplicationError extends Error {
|
||||
constructor(message, { level, tags = {}, extra, ...rest } = {}) {
|
||||
super(message, rest);
|
||||
this.level = level ?? 'error';
|
||||
this.tags = tags;
|
||||
this.extra = extra;
|
||||
try {
|
||||
const filePath = (0, callsites_1.default)()[2].getFileName() ?? '';
|
||||
const match = /packages\/([^\/]+)\//.exec(filePath)?.[1];
|
||||
if (match)
|
||||
this.tags.packageName = match;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
exports.ApplicationError = ApplicationError;
|
||||
//# sourceMappingURL=application.error.js.map
|
||||
Reference in New Issue
Block a user