This commit is contained in:
Jaakko-Heikki Heusala 2015-01-30 11:16:57 +00:00
commit 6c6f3505fd
2 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ JS_Parse_Error.prototype.toString = function() {
};
function js_error(message, filename, line, col, pos) {
throw new JS_Parse_Error(message, line, col, pos);
throw new JS_Parse_Error(''+ message + ' at ' + filename, line, col, pos);
};
function is_token(token, type, val) {

View File

@ -80,7 +80,7 @@ exports.minify = function(files, options) {
: fs.readFileSync(file, "utf8");
sourcesContent[file] = code;
toplevel = UglifyJS.parse(code, {
filename: options.fromString ? "?" : file,
filename: options.fromString ? (options.filename ? options.filename : "?") : file,
toplevel: toplevel
});
});