Sending an Exception to the Exception Handling Application Block

Topics: Exception Handling Application Block
Jul 31, 2007 at 1:48 PM
Edited Aug 1, 2007 at 8:22 AM
In the enterprise library documentation there is an example of using the Exception handling in a document with the same title as this discussion. The code is as follows:
try
{
// Run code.
}
catch(DataAccessException ex)
{
bool rethrow = ExceptionPolicy.HandleException(ex, "Data Access Policy");
if (rethrow)
{
throw;
}
}

Why would you enter a specific exception at this point? I thought that the purpose of the Exception block was to leave such considerations to the configuration, so that this may be easily changed/extended later on.

/Baard