diff options
author | Arun Isaac | 2023-09-20 10:35:08 +0100 |
---|---|---|
committer | Arun Isaac | 2023-09-20 10:35:08 +0100 |
commit | 1ec0bef2bdc8c1b937eef71f93d35e98f0f2f688 (patch) | |
tree | f36514a3ba7c6a2d0fd4b5eb26571516ebddd987 /scripts | |
parent | ca6df72041e1c397b4b0d12d6b26088d404c4ea1 (diff) | |
download | ccwl-1ec0bef2bdc8c1b937eef71f93d35e98f0f2f688.tar.gz ccwl-1ec0bef2bdc8c1b937eef71f93d35e98f0f2f688.tar.lz ccwl-1ec0bef2bdc8c1b937eef71f93d35e98f0f2f688.zip |
scripts: Ignore quit exceptions when requesting the user report bugs.
* scripts/ccwl: Import (ice-9 exceptions).
(main): Do not print backtrace or request the user to report a bug for
quit exceptions.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ccwl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/ccwl b/scripts/ccwl index e299413..57078dd 100755 --- a/scripts/ccwl +++ b/scripts/ccwl @@ -30,6 +30,7 @@ exec guile --no-auto-compile -e main -s "$0" "$@" (srfi srfi-28) (srfi srfi-37) (ice-9 match) + (ice-9 exceptions) (ccwl ccwl) (ccwl conditions) (ccwl cwl) @@ -50,16 +51,21 @@ exec guile --no-auto-compile -e main -s "$0" "$@" (define (main args) (with-exception-handler (lambda (condition) - (display-backtrace (make-stack #t) (current-error-port)) - (newline (current-error-port)) - (write condition (current-error-port)) - (newline (current-error-port)) - (display " + ;; Catch uncaught exceptions, print their backtrace and + ;; request the user report an issue. Pass quit exceptions + ;; through since those may be raised by exceptions that have + ;; been handled. + (unless (quit-exception? condition) + (display-backtrace (make-stack #t) (current-error-port)) + (newline (current-error-port)) + (write condition (current-error-port)) + (newline (current-error-port)) + (display " You have discovered a bug! Please report this to https://github.com/arunisaac/ccwl/issues Thank you! " - (current-error-port)) + (current-error-port))) (exit #f)) (lambda () (match args |