|
发表于 2022-7-6 01:05:34
|
显示全部楼层
That is not advised... The reason for temporarily redefining the default *error* handler, is to perform custom actions in the event of an error in your routine. If the default *error* handler is not properly restored, this will cause other errors to potentially not be handled properly, which can ultimately lead to a fatal error (crash).
For this reason, I choose to localize my routine's *error* function, as when the routine ends, it is no longer defined (i.e., removed from scope).
I hope that makes (more?) sense.
Cheers |
|