From a936e985a468f8b32bd8812e624f8af52dac2ca3 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 5 Jun 2013 01:07:56 +0200 Subject: Catch wrong number of arguments case If a command gets the wrong number of arguments, tell the user. --- gitto/main.scm | 9 ++++++--- 1 file 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 '()) -- cgit v1.2.3-54-g00ecf