Friday, May 21, 2004

Response to Doug's Response

Doug responded to my post by pointing out how I failed to take into account the logging and instrumentation he had included. Fair enough. I guess I've just been spoiled by working in Java for so long. In Java, any code that catches the exception can log the entire stack the exception has traversed (with line numbers) by simply calling Throwable.printStackTrace(). As for additional instrumentation, I've written an Exception class we use a lot here on Workplace that allows arbitrary annotations to be attached to an exception. When the exception is logged, all the annotations are logged as well. The original thrower of the exception can add annotations as can classes up that stack that are willing to catch and rethrow it. I blogged about this technique a while back.
Post a Comment
 
The Out Campaign: Scarlet Letter of Atheism