added some comments for handler-case cases

This commit is contained in:
a. fox 2023-07-13 21:39:20 -04:00
parent dc7e025f8c
commit b3d280232e
1 changed files with 8 additions and 3 deletions

View File

@ -97,22 +97,27 @@
(let ((from (getf opts :from "gts"))
(to (getf opts :to)))
(format t "~A" (convert (first args) from to)))))
;; catches ctrl-c
(user-abort ()
(uiop:quit 0))
;; catches our custom condition for easier error printing
(timecalc-signal (s)
(apply #'format `(t ,(message s) ,@(signal-args s)))
(uiop:quit 2))
;; catches missing arguments for cmd line options
(opts:missing-arg (c)
(format t "~A~%" c)
(uiop:quit 1))
;; catches missing options that are required
(opts:missing-required-option (c)
(format t "~A~%" c)
(uiop:quit 1))
;; catches any and everything else :relieved:
(error (e)
(format t "encountered error:~%~A~%" e)
(uiop:quit 1))))