Ditto to MP's philosophy, although it's usually my expectations that are incorrect.
One of the reasons I started this topic, is because of my macros.lsp file having a glitch. Although I cannot find it, it is because of the esc key in the middle of a command. Hence the question of a global error trap rather than several individual ones.
So Se7en, how do you gracefully exit when the esc key is hit ? How do all of you exit when the esc key is hit ?
Usually, the esc key is hit because of the lack of thinking ahead far enough to realize the proper steps in accomplishing a task. I try to eliminate the 'thinking ahead' part when writing code, but it gets rather difficult if not impossible at times.
Kerry, you mentioned:
...
general observation :
'error trapping' and 'environment restoration' are 2 different things, and should be treated accordingly.
I have recently discovered this aspect as a user hit the escape key in the middle of a command and it took him back several commands, eliminating half of what was just designed and drawn. It restored the environment, but didn't trap the error (or in this case, the esc key).
But I do not know where it is coming from. Do you have any suggestions I can try to find this little discrepency ? I know it's like looking for a needle in a haystack, and I'm hoping you guys will have some comments and thoughts which will help me reduce the amount of 'hay' I have to sift through.
Thank you all for your input, this is very, very informative. You can't get this kind of information from a book, it comes from experience. Which is why were here right ?, you guys are great !!