fwiw:
isn't this statement likely to clobber functionality of any other loaded routine, incurring wrath ??
I haven't written much vl code for a few years, but this (see attached to the linked post ) is how I've managed errors and restoring system variables for a long time.
https://www.theswamp.org/index.php?topic=33105.0I had a call to (kdub:restoresysvar) in the
kdub:on-error() method, but could have added it in-line into the local *error*() declaration.
Importing a base method and adding to it keeps the code cleaner.
ie:
(defun *error* (msg
) (kdub:on
-error msg
) (kdub:restoresysvar
) (princ))
I really prefer just calling the local *error*() with a null msg parameter at the end of the main method.
ie:
At the end of the day, the manner of handling errors and restoring the environment is a matter of personal preference.
. . . not doing it is unprofessional.