aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 4ebcd03..334f761 100644
--- a/src/main.c
+++ b/src/main.c
@@ -17,6 +17,12 @@ int main(int argc, char **argv) {
fprintf(stderr, "Error: %s", Interp_ref(&interp, ret)->str);
mainret = -1; goto end;
}
+ if (Interp_ref(&interp, ret)->type == kExceptionSignal) {
+ const char *exception_str = lisp_to_string(&interp, Interp_ref(&interp, ret)->ret);
+ fprintf(stderr, "Uncatched exception: %s\n", exception_str);
+ free((void*)exception_str);
+ mainret = -1; goto end;
+ }
if (Interp_ref(&interp, ret)->type == kBreakSignal
|| Interp_ref(&interp, ret)->type == kContinueSignal
|| Interp_ref(&interp, ret)->type == kReturnSignal) {