about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorArun Isaac2026-06-21 00:49:27 +0100
committerArun Isaac2026-06-21 00:49:27 +0100
commit48b54461a93f88b4ef4e9a9d01325e63f5d541ca (patch)
tree6c8e992431cea2e39bb20f5a1db1608fc4d3f7eb /scripts
parentc46bf6396492ec3116179900ac034919357c1b27 (diff)
downloadccwl-48b54461a93f88b4ef4e9a9d01325e63f5d541ca.tar.gz
ccwl-48b54461a93f88b4ef4e9a9d01325e63f5d541ca.tar.lz
ccwl-48b54461a93f88b4ef4e9a9d01325e63f5d541ca.zip
scripts: Report unbalanced parentheses gracefully.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ccwl11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/ccwl b/scripts/ccwl
index 2ecd66c..34a45c0 100755
--- a/scripts/ccwl
+++ b/scripts/ccwl
@@ -108,6 +108,17 @@ exec guile --no-auto-compile -e main -s "$0" "$@"
         (cond
          ((formatted-message? condition)
           (report-formatted-message condition))
+         ((and (eq? (exception-kind condition)
+                    'read-error)
+               (message-condition? condition)
+               (irritants-condition? condition))
+          ;; TODO: Once https://codeberg.org/guile/guile/issues/206 is
+          ;; fixed, report error in source context using
+          ;; report-ccwl-violation.
+          (report-formatted-message
+           (apply formatted-message
+                  (condition-message condition)
+                  (condition-irritants condition))))
          ((not (quit-exception? condition))
           (display "You have discovered a bug! ccwl crashed! :-(
 Please report this to https://github.com/arunisaac/ccwl/issues