mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Reverting the unthrow of the error.
This commit is contained in:
parent
cdde576182
commit
6becd8fb13
3 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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')];
|
||||
|
|
|
@ -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}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue