TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: taner on December 20, 2008, 01:19:54 AM

Title: need help with explaination of catch:OnError
Post by: taner on December 20, 2008, 01:19:54 AM
Dear all,

There is a function as below:(http://www.xdcad.net/forum/showthread.php?s=&threadid=13775)

Code: [Select]
(defun catch-error (catch:Protected catch:OnError / catch:err)
    (setq catch:err
       (vl-catch-all-apply catch:Protected)
    )
    (if (and (vl-catch-all-error-p catch:err)
             catch:OnError
        )
        (Apply catch:OnError
           (list (vl-catch-all-error-message catch:err))
        )
        catch:err
    )
 )

I can not understand the argument about catch:OnError , I need some more detailed explaination about it. It is good to give me an example.

Thanks in advance.
Title: Re: need help with explaination of catch:OnError
Post by: FengK on December 20, 2008, 03:25:37 AM
catch:OnError is a function to be called when the function catch:Protected fails. try writing a couple of functions to test. if you need help, one of the members will jump in.
Title: Re: need help with explaination of catch:OnError
Post by: taner on December 20, 2008, 04:02:30 AM
I understand it all at a once!
Title: Re: need help with explaination of catch:OnError
Post by: CAB on December 20, 2008, 03:29:23 PM
Here is another routine:
http://forums.augi.com/showthread.php?p=796998#post796998