2 cents, about a more general error-trapping-wrapping -
;; Reset variables
(mapcar 'setvar vars vals)
(princ)
)
can become:
;; Reset variables
(*error* nil)
(princ)
)
I saw that from Lee Mac,
Hence you can do whatever you want within the *error* function definition,
except for restoring variables also including EndUndoMark or erasing a temporarily created .dcl file.
So that way can be avoided some repetitive code.