diff --git a/conditions.lisp b/conditions.lisp index fe56b27e..07838afb 100644 --- a/conditions.lisp +++ b/conditions.lisp @@ -1,30 +1,11 @@ (in-package #:serapeum) (defmacro ignoring (type &body body) - "An improved version of `ignore-errors`. - -The behavior is the same: if an error occurs in the body, the form -returns two values, `nil` and the condition itself. - -`ignoring` forces you to specify the kind of error you want to ignore: - - (ignoring parse-error - ...) - -I call it an improvement because I think `ignore-errors` is too broad: -by hiding all errors it becomes itself a source of bugs. - -Of course you can still ignore all errors, at the cost of one extra -character: - - (ignoring error - ...) - -NB `(ignoring t)` is a bad idea." - `(handler-case - (progn ,@body) - (,type (c) - (values nil c)))) + "DEPRECATED: use `alexandria:ignore-some-conditions` instead." + (simple-style-warning "~s is deprecated, use ~s instead" + 'ignoring 'ignore-some-conditions) + `(ignore-some-conditions (,type) + ,@body)) (defun maybe-invoke-restart (restart &rest values) "When RESTART is active, invoke it with VALUES."