Sonar: Correctness - Exception created and dropped rather than thrown