diff --git a/scsh/scsh-package.scm b/scsh/scsh-package.scm index 2eeb7b6..cf935f5 100644 --- a/scsh/scsh-package.scm +++ b/scsh/scsh-package.scm @@ -232,6 +232,7 @@ general-tables simple-syntax exit-hooks + display-conditions scsh-endian) (for-syntax (open scsh-syntax-helpers scheme)) diff --git a/scsh/scsh.scm b/scsh/scsh.scm index c20ebac..2d88cfa 100644 --- a/scsh/scsh.scm +++ b/scsh/scsh.scm @@ -10,10 +10,15 @@ (with-continuation null-continuation (lambda () - (dynamic-wind - (lambda () (values)) - thunk - (lambda () (exit 0)))))) + (with-handler + (lambda (c more) + (display-condition c (current-error-port)) + (exit 1)) + (lambda () + (dynamic-wind + (lambda () (values)) + thunk + (lambda () (exit 0)))))))) ;; from shift-reset.scm: (define null-continuation #f)