Export (0) Print
Expand All

Extending and Modifying the Exception Handling Application Block

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

In its original state, the Exception Handling Application Block works well for typical exception handling scenarios, such as logging an exception message, wrapping one exception with another, or replacing an exception with a different exception. However, there may be times when you have to customize certain behaviors of the application block to better suit your application's particular requirements. There are two ways to do this: extension and modification.

Extending the Exception Handling Application Block

You extend the Exception Handling Application Block through designated extension points. Typically, these are custom classes written by you that implement a particular interface or derive from an abstract class. Because these custom classes exist in your application space, you do not have to modify or rebuild the Exception Handling Application Block; instead, you can designate your extensions through configuration settings.

You can extend the Exception Handling Application Block by implementing custom exception handlers and exception formatters. To learn more, see Adding a New Exception Handler and Adding a New Exception Formatter.

Modifying the Exception Handling Application Block

You modify the Exception Handling Application Block by making changes to the Exception Handling Application Block's source code. This may, or may not, require associated configuration changes. Because changes are made to the source code, you must rebuild the Exception Handling Application Block before the modifications take effect. You must also be prepared to handle support and versioning issues. To learn more, see Modifying the Exception Handling Application Block.

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.
Show:
© 2015 Microsoft