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) {
|
if (options.filename) {
|
||||||
err.message = "In " + options.filename + ", " + err.message;
|
err.message = "In " + options.filename + ", " + err.message;
|
||||||
}
|
}
|
||||||
console.error(err.message);
|
throw err;
|
||||||
process.exit(1);
|
|
||||||
}
|
}
|
||||||
header = "Generated by CoffeeScript " + this.VERSION;
|
header = "Generated by CoffeeScript " + this.VERSION;
|
||||||
return "// " + header + "\n" + js;
|
return "// " + header + "\n" + js;
|
||||||
|
|
|
@ -2887,7 +2887,7 @@
|
||||||
args = [];
|
args = [];
|
||||||
if ((mentionsArgs = expressions.contains(this.literalArgs)) || expressions.contains(this.literalThis)) {
|
if ((mentionsArgs = expressions.contains(this.literalArgs)) || expressions.contains(this.literalThis)) {
|
||||||
if (mentionsArgs && expressions.classBody) {
|
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');
|
meth = new Literal(mentionsArgs ? 'apply' : 'call');
|
||||||
args = [new Literal('this')];
|
args = [new Literal('this')];
|
||||||
|
|
|
@ -40,8 +40,7 @@ exports.compile = compile = (code, options = {}) ->
|
||||||
return js unless options.header
|
return js unless options.header
|
||||||
catch err
|
catch err
|
||||||
err.message = "In #{options.filename}, #{err.message}" if options.filename
|
err.message = "In #{options.filename}, #{err.message}" if options.filename
|
||||||
console.error err.message
|
throw err
|
||||||
process.exit 1
|
|
||||||
header = "Generated by CoffeeScript #{@VERSION}"
|
header = "Generated by CoffeeScript #{@VERSION}"
|
||||||
"// #{header}\n#{js}"
|
"// #{header}\n#{js}"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue