Fixed another Sonar issue by sending exception to logger