aboutsummaryrefslogtreecommitdiff
path: root/ccwl
diff options
context:
space:
mode:
authorArun Isaac2023-10-16 15:30:55 +0100
committerArun Isaac2023-10-16 15:30:55 +0100
commitbb6b3e677cc35c8f55d8e167b2c35b915e3a8dfe (patch)
tree52ea9959d07e9572f85d0fd9e93ffc038ca0d080 /ccwl
parent5e774d8f08d9a89352873289d856d0d5c2a47f41 (diff)
downloadccwl-bb6b3e677cc35c8f55d8e167b2c35b915e3a8dfe.tar.gz
ccwl-bb6b3e677cc35c8f55d8e167b2c35b915e3a8dfe.tar.lz
ccwl-bb6b3e677cc35c8f55d8e167b2c35b915e3a8dfe.zip
ccwl: Raise &ccwl-violation on invalid command #:run arguments.
* ccwl/ccwl.scm (command): Raise &ccwl-violation on invalid command #:run arguments. * tests/ccwl.scm ("command definitions with invalid #:run arguments must raise a &ccwl-violation condition"): New test.
Diffstat (limited to 'ccwl')
-rw-r--r--ccwl/ccwl.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm
index a319105..695fa8d 100644
--- a/ccwl/ccwl.scm
+++ b/ccwl/ccwl.scm
@@ -347,8 +347,11 @@ RUN-ARGS. If such an input is not present in RUN-ARGS, return #f."
(begin
(ensure-input-is-defined #'input)
#''input))
- (_ (error "Invalid command element:"
- (syntax->datum x)))))
+ (_
+ (raise-exception
+ (condition (ccwl-violation x)
+ (formatted-message "Invalid command element ~a. Command elements must either be input identifiers or literal strings."
+ (syntax->datum x)))))))
run)))
#,(and stdin #`'#,stdin)
#,(if (and stderr