Skip to content

Commit 8eed678

Browse files
[js] exit with code 1 on uncaught exception in nodejs environment (fixes #7)
1 parent 0fa7fc3 commit 8eed678

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ cSpell.json
55
.idea
66
lab
77
.vscode
8-
jstack.zip
8+
jstack.zip
9+
dump

src/jstack/js/JStack.hx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ class JStack {
150150
var error = uncaughtExceptionHandler(e);
151151
if(error != null && error.length > 0) {
152152
untyped __js__('console.log({0})', error);
153+
if (isNode()) {
154+
untyped __js__('process.exit(1)');
155+
}
153156
}
154157
}
155158

0 commit comments

Comments
 (0)