aboutsummaryrefslogtreecommitdiffstats
path: root/l/src/main.lisp
diff options
context:
space:
mode:
authorTeddy Wing2021-02-13 19:03:55 +0100
committerTeddy Wing2021-02-13 19:03:55 +0100
commit597d0b953fca40c1035cee6263b12fa5223ebf51 (patch)
tree02818f084a357eb2ac614bbb70540b9efb9e9a9f /l/src/main.lisp
parenta61b3e561410a0c2201abfca5bf9e178534e8152 (diff)
downloadextreload-597d0b953fca40c1035cee6263b12fa5223ebf51.tar.bz2
Add a generic "print error and exit" function
I wanted to centralise the formatting of error printing.
Diffstat (limited to 'l/src/main.lisp')
-rw-r--r--l/src/main.lisp7
1 files changed, 1 insertions, 6 deletions
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.