added some comments for handler-case cases
This commit is contained in:
parent
dc7e025f8c
commit
b3d280232e
|
@ -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))))
|
||||
|
|
Loading…
Reference in New Issue