Hi,
Standard CL provides with the ERROR function a convenient way to signal simple-errors, but (unless I've overlooked something) things get verbose for simple-error subclasses.
E.g.
(define-condition my-error (simple-error) ((arg :initarg :arg :initform nil)))
(error 'my-error :arg "foo" :format-control "Something is wrong: ~A" :format-arguments (list xyz))
To tidy things up, I've written the SERROR function:
(serror 'my-error :arg "foo" "Something is wrong: ~A" xyz)
(serror 'my-error "Something is wrong: ~A" xyz)
(serror 'my-error "Something is wrong.")
Of course I'm sending this because I'd like to have it in Alexandria :-)
Thanks, Stefan
alexandria-devel@common-lisp.net