Either log or rethrow this exception sonarqube
What you will learn here about Sonarqube
- Either log or rethrow this exception sonarqube
Either log or rethrow this exception sonarqube
Here we will understand how to fix Either log or rethrow this exception issue on sonarqube with sample program
You will get Either log or rethrow this exception issue on sonarqube when you are trying log as well as your throwing exception in the same block which is shown below
Solution1: Instead logging and throwing exception in same block only log the message which is shown below.
Solution2: Instead logging and throwing exception in same block only throw the exception which is shown below.