diff options
author | Teddy Wing | 2021-02-13 19:03:55 +0100 |
---|---|---|
committer | Teddy Wing | 2021-02-13 19:03:55 +0100 |
commit | 597d0b953fca40c1035cee6263b12fa5223ebf51 (patch) | |
tree | 02818f084a357eb2ac614bbb70540b9efb9e9a9f /l/src/option.lisp | |
parent | a61b3e561410a0c2201abfca5bf9e178534e8152 (diff) | |
download | extreload-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/option.lisp')
-rw-r--r-- | l/src/option.lisp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/l/src/option.lisp b/l/src/option.lisp index 14553a0..b666fa4 100644 --- a/l/src/option.lisp +++ b/l/src/option.lisp @@ -5,10 +5,13 @@ (when value ,@body))) -(defun handle-option-error (condition) +(defun exit-with-error (condition exit-code) (format *error-output* "error: ~a~%" condition) - (opts:exit 64)) + (opts:exit exit-code)) + +(defun handle-option-error (condition) + (exit-with-error condition 64)) (defun parse-options () (multiple-value-bind (options free-args) |