passing the exception to the logging message