mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 19:34:27 -05:00
made catch optional
This commit is contained in:
@@ -1478,7 +1478,7 @@
|
||||
o.top = true;
|
||||
attemptPart = this.attempt.compile(o);
|
||||
errorPart = this.error ? (" (" + (this.error.compile(o)) + ") ") : ' ';
|
||||
catchPart = this.recovery ? (" catch" + (errorPart) + "{\n" + (this.recovery.compile(o)) + "\n" + (this.tab) + "}") : '';
|
||||
catchPart = this.recovery ? (" catch" + (errorPart) + "{\n" + (this.recovery.compile(o)) + "\n" + (this.tab) + "}") : (!(this.ensure || this.recovery) ? ' catch (_e) {}' : '');
|
||||
finallyPart = (this.ensure || '') && ' finally {\n' + this.ensure.compile(merge(o)) + ("\n" + (this.tab) + "}");
|
||||
return "" + (this.tab) + "try {\n" + (attemptPart) + "\n" + (this.tab) + "}" + (catchPart) + (finallyPart);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user