summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lali.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lali.c b/lali.c
index 73fc601..bdf72b0 100644
--- a/lali.c
+++ b/lali.c
@@ -50,7 +50,7 @@ void runFile(int infd, Object **env, GC_PARAM) {
GC_TRACE(gcObject, nil);
if (setjmp(exceptionEnv))
- return;
+ exit(EXIT_FAILURE);
// deal with shebang
if (peekForward(&stream, true) == EOF)
@@ -69,6 +69,8 @@ void runREPL(int infd, Object **env, GC_PARAM) {
Stream stream = { STREAM_TYPE_STRING, .buffer = "" };
GC_TRACE(gcObject, nil);
+ setjmp(exceptionEnv);
+
do {
/* If the buffer has already been allocated,
return the memory to the free pool. */