用下面的代码简单测试了下
 - (defun *error* (s)
- (princ "1")
- )
- (defun test (/ *error*)
- (defun *error* (s)
- (princ "2")
- )
- (/ 1 0)
- )
; 2 表格 从 #<editor "<未命名-0> 正在加载..."> 加载
_$ *error*
#<USUBR @0c5a74ec *ERROR*>
_$ (test)
2
_$ *error*
#<USUBR @0c5a74ec *ERROR*>
_$ (test)
2
_$ (/ 1 0)
1
可见,test内的错误由test内部定义的*error*处理,而在test函数外部的错误由外面定义的*error处理。没有看到同时调用内外部*error*的情况
|