"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;
