diff options
| author | Arun Isaac | 2026-06-20 22:49:15 +0100 |
|---|---|---|
| committer | Arun Isaac | 2026-06-20 22:57:50 +0100 |
| commit | c46bf6396492ec3116179900ac034919357c1b27 (patch) | |
| tree | 3a234411331e1d0750e038b3880ccafd2bcce6d8 /scripts | |
| parent | bd928d41f1627aad98db3620d6e05a8aa4ecbef2 (diff) | |
| download | ccwl-c46bf6396492ec3116179900ac034919357c1b27.tar.gz ccwl-c46bf6396492ec3116179900ac034919357c1b27.tar.lz ccwl-c46bf6396492ec3116179900ac034919357c1b27.zip | |
scripts: Print bug report request before backtrace.
This way we can delegate backtrace printing to the default exception handler. Somehow, I can't seem to get display-backtrace and make-stack to replicate the behaviour of the default exception handler.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/ccwl | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/scripts/ccwl b/scripts/ccwl index fe17991..2ecd66c 100755 --- a/scripts/ccwl +++ b/scripts/ccwl @@ -100,24 +100,23 @@ exec guile --no-auto-compile -e main -s "$0" "$@" (define (main args) (with-exception-handler (lambda (condition) - ;; 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. + ;; Catch uncaught exceptions, request the user report an + ;; issue, and re-raise the exception so the default exception + ;; handler can deal with it. Pass quit exceptions through + ;; since those may be raised by exceptions that have been + ;; handled. (cond ((formatted-message? condition) (report-formatted-message condition)) ((not (quit-exception? condition)) - (display-backtrace (make-stack #t) (current-error-port)) - (newline (current-error-port)) + (display "You have discovered a bug! ccwl crashed! :-( +Please report this to https://github.com/arunisaac/ccwl/issues +Thank you!\n\n" + (current-error-port)) (write condition (current-error-port)) (newline (current-error-port)) - (display " -You have discovered a bug! ccwl crashed! :-( -Please report this to https://github.com/arunisaac/ccwl/issues -Thank you! -" - (current-error-port)))) + (newline (current-error-port)) + (raise-exception condition))) (exit #f)) (lambda () (match args |
