File: /home/frenchy/www/french-american.org/current/node_modules/uglyfly-js/lib/JS_Parse_Error.js
/***********************************************************************
Copyright 2014 (c) Saair Quaderi <saair.quaderi@gmail.com>
Copyright 2012-2013 (c) Mihai Bazon <mihai.bazon@gmail.com>
UglyflyJS sourcecode can be found here:
https://github.com/quaderi/uglyflyjs
UglyflyJS (by Saair) is a fork of UglifyJS2 (by Mihai Bazon)
Both libraries are released under the BSD 2-Clause License.
***********************************************************************/
/*globals define, module, require */
((typeof define === "function") ? define :
function () { "use strict"; require('./nd').apply(module, arguments); })(
"JS_Parse_Error",
[
//no dependencies
],
function () {
"use strict";
function JS_Parse_Error(message, filename, line, col, pos) {
this.message = message;
this.filename = filename;
this.line = line;
this.col = col;
this.pos = pos;
this.stack = new Error().stack;
}
JS_Parse_Error.prototype.toString = function () {
return this.message + " (filename: \"" + this.filename + "\", line: " + this.line + ", col: " + this.col + ", pos: " + this.pos + ")" + "\n\n" + this.stack;
};
return JS_Parse_Error;
}
);