Name: Anonymous 2010-08-31 8:10
Discuss.
(defun some-function (signal-error)
(block nil
(ignore-errors
(unwind-protect
;; the return form is unneeded as
;; returns are implicit in CL, but I've
;; included it to illustrate the point
(return
(prog1
(print "In RETURN")
(when signal-error
(error "Oh no. Something bad happened."))
(print "In PROG1")))
(print "In protected area")))))
(some-function nil)
; Prints
;"In RETURN"
;"In PROG1"
;"In protected area"
(some-function t)
; Prints
;"In RETURN"
;"In protected area"