diff options
Diffstat (limited to 'src/util.lisp')
-rw-r--r-- | src/util.lisp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util.lisp b/src/util.lisp index f9098b1..903c330 100644 --- a/src/util.lisp +++ b/src/util.lisp @@ -71,6 +71,14 @@ supported." unless (char= #\& (char (symbol-name arg*) 0)) collect arg*)) +(defmacro define-simple-error (name &optional docstring) + `(progn + (define-condition ,name (simple-error) () + ,@(and docstring `((:documentation ,docstring)))) + (defun ,name (message &rest args) + ,@(and docstring `(,docstring)) + (error ',name :format-control message :format-arguments args)))) + ;;;; Version numbers |