阅读:2041回复:0
[求助]autolisp
<P>(defun catcherror(dividen divisor / errobj)<BR> (setq errobj (vl-catch-all-apply '/ (list dividen divisor)))<BR> (if (vl-catch-all-apply)<BR> (progn<BR> (print (strcat "an error occurred:" (vl-catch-all-error-message errobj)))<BR> (prompt "do you wanna continue?(Y/N)")<BR> (setq ang (getstring))<BR> (if (= "Y" (strcase ang))<BR> (print "ok,i'll keep going")<BR> )<BR> )<BR> (print errobj)<BR> )<BR> (princ)<BR>)</P>
<P>哪错了</P> |
|