• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

avoid error reporting with the exit

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
This code disc :
Code:
 (if)
(progn)
(setq boundarystr (vl-string-trim " contourstr))
(setq fp1 (open "c:\\\autocadsupport\\\\\\\\\stringa.dat" "w"))
(write-line (- cont 2) fp1)
(write-line contourstr fp1)
(close fp)
(alert "saved data")
(exit)
);
);
stops the program at the instruction (exit) but produces an error message!
I don't understand why.
Thank you.
 
I use the vl-exit-with-error command when I want to leave without so many problems: e.g. when a list is not yet complete and I have not yet "managed" a certain situation.
e.g. if you do not find a file:

(if (null salv) (vl-exit-with-error (alert (strcat tipoel "1.txt\nnon found"))
; with vl-exit-with-error command comes clean...

;; (if (null salv)
... but with quit it goes wrong!
 
perfect x11start, the command (vl-exit-with-error "out of the program") works wonder, without error signaling!
Thank you.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top