Skip to content

Commit

Permalink
fix try..catch #317
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Feb 25, 2024
1 parent 225cabf commit 14e65e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lips.js
Original file line number Diff line number Diff line change
Expand Up @@ -9438,8 +9438,8 @@ var global_env = new Environment({
throw e;
}
body_error = true;
var env = this.inherit('try');
if (catch_clause) {
var env = this.inherit('try');
const name = catch_clause.cdr.car.car;
if (!(name instanceof LSymbol)) {
throw new Error('try: invalid syntax: catch require variable name');
Expand Down Expand Up @@ -9467,7 +9467,7 @@ var global_env = new Environment({
});
} else {
next(undefined, () => {
throw e;
reject(e);
});
}
}
Expand Down

0 comments on commit 14e65e3

Please sign in to comment.