N
nickdu
Can't think of a better subject for this. What I would like to know is if
the following will do what I'm hoping it will do:
try
{
...
}
catch(Exception)
{
try
{
EventLog.WriteEntry(...);
}
catch(Exception)
{
}
throw;
}
Here I would like to write an event to the NT event log in the case of an
error. However if I fail writing the NT event log, maybe because my event
source is not registered, I don't want to lose the original exception that
caused the error. Will the throw; statement still throw the original
exception even if EventLog.WriteEntry() causes an exception?
--
Thanks,
Nick
(e-mail address removed)
remove "nospam" change community. to msn.com
the following will do what I'm hoping it will do:
try
{
...
}
catch(Exception)
{
try
{
EventLog.WriteEntry(...);
}
catch(Exception)
{
}
throw;
}
Here I would like to write an event to the NT event log in the case of an
error. However if I fail writing the NT event log, maybe because my event
source is not registered, I don't want to lose the original exception that
caused the error. Will the throw; statement still throw the original
exception even if EventLog.WriteEntry() causes an exception?
--
Thanks,
Nick
(e-mail address removed)
remove "nospam" change community. to msn.com