Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

unsupressing autolisp crashes

3 REPLIES 3
Reply
Message 1 of 4
jeffds
128 Views, 3 Replies

unsupressing autolisp crashes

Hi,
I have just started using 2000.
In R14 and back when a run-time error occured in Autolisp the code would scroll onto the screen at the line it crashed at. In 2000i this doesn't happen. Is there a way to toggle this on to see where the routine is crashing. I have a client in Perth (I'm in Melbourne) who is having a probelm with a routine I have written for him. It works on my installation but not his. He is getting an error: stringp nil. So some variable has not been correctly initialised but I can't tell where!

Thanks for any help.
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: jeffds

I would include in each routine your own *error* function to display what
went wrong. For instance:
(defun c:MyProgram ( / *error*)
(defun *error* (error)
(if (not (wcmatch (strcase error) "*CANCEL*,*QUIT*"))
(princ (strcat "\nERROR: " error))
)
)
)


--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juhden@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332

"jeffds" wrote in message
news:f08580c.-1@WebX.maYIadrTaRb...
> Hi,
> I have just started using 2000.
> In R14 and back when a run-time error occured in Autolisp the code would
scroll onto the screen at the line it crashed at. In 2000i this doesn't
happen. Is there a way to toggle this on to see where the routine is
crashing. I have a client in Perth (I'm in Melbourne) who is having a
probelm with a routine I have written for him. It works on my installation
but not his. He is getting an error: stringp nil. So some variable has not
been correctly initialised but I can't tell where!
> Thanks for any help.
>
>
Message 3 of 4
Anonymous
in reply to: jeffds

Since Visual LISP "compiles" the text into byte codes, the scroll-back
of text isn't really available any more. However, you can have your
customer load the following:

(defun *error* (msg)
(vl-bt)
(princ)
)

and then run your program. The error will cause a ton of information
to be printed out, which you can use to figure out where the error
occurred.

jrf
Member of the Autodesk Discussion Forum Moderator Program
Please do not email questions unless you wish to hire my services

In article , Jeffds wrote:
> Hi,
> I have just started using 2000.
> In R14 and back when a
> run-time error occured in Autolisp the code would scroll onto the
> screen at the line it crashed at. In 2000i this doesn't happen. Is
> there a way to toggle this on to see where the routine is crashing.
> I have a client in Perth (I'm in Melbourne) who is having a probelm
> with a routine I have written for him. It works on my installation
> but not his. He is getting an error: stringp nil. So some variable
> has not been correctly initialised but I can't tell where!
> Thanks
> for any help.
>
Message 4 of 4
Anonymous
in reply to: jeffds

Does your client have your source code or a compiled version?
Does your client also have AC2000i?
Can your client use the debugger built in to VLISP editor?

When my programs bust, the error also usually includes the calling function. Perhaps
you could remove your error handler to get a better report of the problem?

I also use temporary print statements that spit out numbers to locate the problem area.

Doug B

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost