From 597d0b953fca40c1035cee6263b12fa5223ebf51 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 13 Feb 2021 19:03:55 +0100 Subject: Add a generic "print error and exit" function I wanted to centralise the formatting of error printing. --- l/src/main.lisp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'l/src/main.lisp') diff --git a/l/src/main.lisp b/l/src/main.lisp index 22c1d07..770d88b 100644 --- a/l/src/main.lisp +++ b/l/src/main.lisp @@ -25,12 +25,7 @@ :long "version")) (defun main () - (handler-bind ((error - #'(lambda (e) - ;; TODO: generic function for this and `handle-option-error` - (format *error-output* "error: ~a~%" e) - - (opts:exit 69)))) + (handler-bind ((error #'(lambda (e) (exit-with-error e 69)))) (let ((config (parse-options))) ;; Store the WebSocket client as a global. -- cgit v1.2.3