Exception chaining

This is an old revision of this page, as edited by Eric119 (talk | contribs) at 04:04, 4 September 2005 (Exception Chaining moved to Exception chaining). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Exception chaining is the process of designing and implementing exception handlers in an application so that individual exceptions can be handled by one or more handlers in a hierarchical manner. For example, in an object-oriented programming model, nested objects may receive exceptions at the lowest level. The object decides if it needs to handle the exception, and can then chain the exception to its parent by reraising the exception and sending it up the line. One example of the usefulness of this technique is mouse click handling. If you want to be able to dynamically control what object responds to a click, exception chaining is usually the most efficient way to accomplish this.