This commit is contained in:
Tutur33
2023-11-24 22:35:41 +01:00
parent 3c0b507a93
commit 7644b2a0f7
45165 changed files with 4803356 additions and 3 deletions
+13
View File
@@ -0,0 +1,13 @@
export declare type ExceptionOptions = {
line: number;
col: number;
filename: string;
};
export declare class EdgeError extends Error {
message: string;
code: string;
line: number;
col: number;
filename: string;
constructor(message: string, code: string, options: ExceptionOptions);
}
+25
View File
@@ -0,0 +1,25 @@
"use strict";
/*
* edge-error
*
* (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.EdgeError = void 0;
class EdgeError extends Error {
constructor(message, code, options) {
super(message);
this.message = message;
this.code = code;
this.line = options.line;
this.col = options.col;
this.filename = options.filename;
const stack = this.stack.split('\n');
stack.splice(1, 0, ` at anonymous (${this.filename}:${this.line}:${this.col})`);
this.stack = stack.join('\n');
}
}
exports.EdgeError = EdgeError;