Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 2
Anonymous
569 Views, 1 Reply

*error*

Hello, Community.

 

I studied *error* handling in last week.

When I tested it, I don't know what is mean msg variable.

 

(defun *error* ( msg )
(princ "\n*error* outside of test program.")
(princ)
)

 

(Lee-mac made the lisp.)

 

When I delete the msg variable.

That does not activate the function.

 

Thanks.

 

1 REPLY 1
Message 2 of 2
cadffm
in reply to: Anonymous

Its for compatibility, Acad errors give an message what going wrong, so you need one argument. Its your choice to use it.

 

 

(defun *error* ( )....

=> error "too many Arguments

 

Test:
(defun *error* ( msg )
(princ (strcat "\n*error* outside of test program. (" msg ")"))
(princ)
)

 

(/ 1 0)

or

(strlen 1)

 

 

 

Sebastian

EESignature

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

Post to forums  

Forma Design Contest


AutoCAD Beta