Skip to content

Commit

Permalink
[js] exit with code 1 on uncaught exception in nodejs environment (fixes
Browse files Browse the repository at this point in the history
 #7)
  • Loading branch information
RealyUniqueName committed Mar 17, 2017
1 parent 0fa7fc3 commit 8eed678
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ cSpell.json
.idea
lab
.vscode
jstack.zip
jstack.zip
dump
3 changes: 3 additions & 0 deletions src/jstack/js/JStack.hx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ class JStack {
var error = uncaughtExceptionHandler(e);
if(error != null && error.length > 0) {
untyped __js__('console.log({0})', error);
if (isNode()) {
untyped __js__('process.exit(1)');
}
}
}

Expand Down

0 comments on commit 8eed678

Please sign in to comment.