From 48b54461a93f88b4ef4e9a9d01325e63f5d541ca Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 21 Jun 2026 00:49:27 +0100 Subject: scripts: Report unbalanced parentheses gracefully. --- scripts/ccwl | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit 1.4.1