- Logging throws an exception
Sometimes you don't care if logging fails. Sometimes logging is really not that important and you absolutely do not want to interrupt the application (and the Customer) just because logging has failed. Right?
try
{
Logger.Write(message);
}
catch
{
}
So there is a real-life scenarios where I think it is okay to swallow an exception...Here is a good discussion on the topic on StackOverflow
No comments:
Post a Comment