(defmacro with-retry (restart-name restart-description &body body)
"Provides a restart named RESTART-NAME with RESTART-DESCRIPTION
as its English description in your debugger's restart menu. Invoking the
restart after an error in the BODY causes the BODY to be evaluated again."
(let ((tag-name (gensym))
(block-name (gensym)))
`(block ,block-name
(tagbody
,tag-name
(restart-case
(return-from ,block-name
(progn ,@body))
(,restart-name () :report ,restart-description
(go ,tag-name)))))))
;; Write the code here.
Provides: WITH-RETRY Requires: nothing Author: j3pic License: BSD