Reverting the unthrow of the error.

This commit is contained in:
Jeremy Ashkenas 2013-01-14 11:44:15 -08:00
parent cdde576182
commit 6becd8fb13
3 changed files with 3 additions and 5 deletions

View File

@ -51,8 +51,7 @@
if (options.filename) {
err.message = "In " + options.filename + ", " + err.message;
}
console.error(err.message);
process.exit(1);
throw err;
}
header = "Generated by CoffeeScript " + this.VERSION;
return "// " + header + "\n" + js;

View File

@ -2887,7 +2887,7 @@
args = [];
if ((mentionsArgs = expressions.contains(this.literalArgs)) || expressions.contains(this.literalThis)) {
if (mentionsArgs && expressions.classBody) {
throw SyntaxError("Class bodies don't have arguments");
throw SyntaxError("Class bodies shouldn't reference arguments");
}
meth = new Literal(mentionsArgs ? 'apply' : 'call');
args = [new Literal('this')];

View File

@ -40,8 +40,7 @@ exports.compile = compile = (code, options = {}) ->
return js unless options.header
catch err
err.message = "In #{options.filename}, #{err.message}" if options.filename
console.error err.message
process.exit 1
throw err
header = "Generated by CoffeeScript #{@VERSION}"
"// #{header}\n#{js}"