Version française
Home     About     Download     Resources     Contact us    
Browse thread
Where did the exception occur?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David McClain <dmcclain@a...>
Subject: Where did the exception occur?
I would like to point out the folly of spending too much effort on language
design directed at displaying the location of an exception. As one who did
so, I can report that the effort was merciless, and although it does as
expected, I found that the location of the exception is rarely the source of
a problem...

Hence, I implemented an entire stack of last visited nodes to provide a
traceback. (I'm a glutton for punishment!).  This not only slows the system
down, but only offers marginal improvement to debugging.

The best way to achieve the stated goal, so far, that I have found, is to
plant a "source coordinate" in the exception itself - something you can do
manually after declaring the exception type to contain this information. But
beware! you will often halt at nonsensical places...

- D.McClain