What happens if my IExceptionPublisher throws an Exception?
- by Graphain
Hi,
I'm using the .NET Exception Management Application Block (EMAB).
As part of this I am implementing IExceptionPublisher classes.
However, I am wondering what happens if these publishers encounter an Exception.
I had a bit of a look around and apparently they are meant to do something like this:
try
{
/* Normal Exception Publishing */
}
catch
{
ExceptionManager.PublishInternalException(exception, additionalInfo);
}
Source:
One caveat: what happens if there is
an exception in our custom publisher
code, preventing the publishing to
MSMQ? For that, we turn to the
ExceptionManager.PublishInternalException
method, which will publish the
exception to the default publisher,
which is the Windows application event
log.
However, PublishInternalException is both protected and internal so I would have to be implementing ExceptionManager, not IExceptionPublisher, to access it.