AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

Back in R14 the attached error handler would bonk out and then spew the code in the buffer to the command line so you could see where it failed. I can't seem to get it to happen in 2000 or in 2000i. Do you know if it is a variable setting?

(defun c:en ()
(if (= *error* nil)
(defun *error* (msg) (command)
(princ (strcat "\nbonk1: " msg)) (princ)
)
(setq *error* nil)
)
)
(c:en)
(c:en)
(princ)


To toggle it on/off just type "en" at the command prompt...

Bill Hashman
-------------------------
Prior to AutoCAD 2000, AutoLisp would dump a bug trace to the command line when an error was encountered. While developers went out of their way to suppress this behaviour in a released product, it was a handy tool during the debugging cycle. To get the same behaviour in AutoCAD 2000, replace the standard error handler with this one :

;CODING STARTS HERE
(vl-load-com)
(defun errdump (s)
(vl-bt)
(princ)
)
;CODING ENDS HERE

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website