about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorArun Isaac2026-06-20 22:49:15 +0100
committerArun Isaac2026-06-20 22:57:50 +0100
commitc46bf6396492ec3116179900ac034919357c1b27 (patch)
tree3a234411331e1d0750e038b3880ccafd2bcce6d8 /scripts
parentbd928d41f1627aad98db3620d6e05a8aa4ecbef2 (diff)
downloadccwl-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-xscripts/ccwl23
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