about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2025-12-02 01:23:50 +0000
committerArun Isaac2025-12-02 01:23:50 +0000
commit5f6e0d93bb08446d2c6f99484523697a2bda7b4d (patch)
tree3626dfe496d9a23b58c69a3fc9273ba9edd8dd6f
parentc937863fd417aa786d4faad9af6f5af466ee397d (diff)
downloadccwl-5f6e0d93bb08446d2c6f99484523697a2bda7b4d.tar.gz
ccwl-5f6e0d93bb08446d2c6f99484523697a2bda7b4d.tar.lz
ccwl-5f6e0d93bb08446d2c6f99484523697a2bda7b4d.zip
scripts: Use raise-exception instead of scm-error. HEAD main
-rwxr-xr-xscripts/ccwl16
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/ccwl b/scripts/ccwl
index 29c64bf..fbd549d 100755
--- a/scripts/ccwl
+++ b/scripts/ccwl
@@ -55,15 +55,13 @@ exec guile --no-auto-compile -e main -s "$0" "$@"
                 (lambda (opt name arg result)
                   (let ((supported (list "cwl" "dot")))
                     (unless (member arg supported)
-                      (scm-error 'misc-error
-                                 #f
-                                 "Invalid target ~A argument ~S. Supported targets are ~A."
-                                 (list (if (char? name)
-                                           (string #\- name)
-                                           (string-append "--" name))
-                                       arg
-                                       (string-join supported ", "))
-                                 #f)))
+                      (raise-exception
+                       (formatted-message "Invalid target ~a argument ~s. Supported targets are ~a."
+                                          (if (char? name)
+                                              (string #\- name)
+                                              (string-append "--" name))
+                                          arg
+                                          (string-join supported ", ")))))
                   (acons 'to (string->symbol arg)
                          result)))
         (option (list #\o "output") #t #f