diff options
| author | 2013-06-05 01:07:56 +0200 | |
|---|---|---|
| committer | 2013-06-05 01:07:56 +0200 | |
| commit | a936e985a468f8b32bd8812e624f8af52dac2ca3 (patch) | |
| tree | a12cece4e532ae5f2e30f55fea0338cddb20ac4a | |
| parent | 5f3dfee5acc0e4993ef51f7da6dca4a8316a633e (diff) | |
| download | gitto-a936e985a468f8b32bd8812e624f8af52dac2ca3.tar.gz gitto-a936e985a468f8b32bd8812e624f8af52dac2ca3.zip | |
Catch wrong number of arguments case
If a command gets the wrong number of arguments, tell the user.
| -rw-r--r-- | gitto/main.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gitto/main.scm b/gitto/main.scm index 8c21830..705faf7 100644 --- a/gitto/main.scm +++ b/gitto/main.scm @@ -34,9 +34,12 @@ exp exp* ...) (begin (set! command-list - (cons (cons (symbol->string (quote name)) - (lambda args - exp exp* ...)) + (cons + (cons (symbol->string (quote name)) + (case-lambda + (args + exp exp* ...) + (lst (format #t "Wrong number of arguments.~%")))) command-list)))))) (define command-list '()) |
