Relative Content

Tag Archive for c#exceptionlogging

Logging an exception before throwing it

In my application, I have a Logger that writes messages about application behavior into a log file. If an exception is about to be thrown, I want it to be logged as well. To achieve this, I’m passing the exception to the Logger, which logs it, and then throws it.