Last active
August 23, 2020 16:07
-
-
Save brulint/38e4a5baf898134a0335c4f391c3478b to your computer and use it in GitHub Desktop.
error handling with common lisp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-condition my-error (condition) | |
((message :initarg :message :reader message))) | |
(handler-case (signal 'my-error :message "Damned! an error!") | |
(my-error (e) (warn "~s" (message e)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment