free hit counter

Thursday, July 07, 2005

succinct definition of exceptions

I'm always interested in sussinct, complete definitions. This is one of the better I've seen:

"An exceptional condition is a problem that prevents the continuation of the method or scope that you’re in. It’s important to distinguish an exceptional condition from a normal problem, in which you have enough information in the current context to somehow cope with the difficulty. With an exceptional condition, you cannot continue processing because you don’t have the information necessary to deal with the problem in the current context. All you can do is jump out of the current context and relegate that problem to a higher context. This is what happens when you throw an exception. "
Thinking in Java, 3rd ed. Revision 4.0


Post a Comment

<< Home