edge-error
Version:
Create errors with custom stack trace pointing to the .edge template file
21 lines (20 loc) • 479 B
JavaScript
// index.ts
var EdgeError = class 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");
}
line;
col;
filename;
};
export {
EdgeError
};