Monday, June 11, 2007
Error Handling
Error handling should be built in to every application, especially those written in an exception handling language. The framework should be very simplistic and easy to use at first, but it should be in place from the beginning. It might even be considered part of a test framework at some level. This occurred to me when I was writing a low level accessor and just put in a sanity check for an array element index. I did not have a sensible framework to throw an exception to, and did not have anything to check it, even at a high level. Putting in error handling at the site of the call would be cumbersome (why were exceptions invented after all?). I will have to settle for an assert which is ok for testing. Here's a good application for AOP...
Subscribe to:
Comments (Atom)