function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ChubbyChubby 

A catch statement that catches an exception only to rethrow it should be avoided

I am getting this error in sonarqube report, please suggest me how to avoid. below is the piece of code giving error.
Catch(Exception ex)
{
throw ex;
}
ANUTEJANUTEJ (Salesforce Developers) 
Hi Chubby,

Can you elaborate the scenario you are implementing and the issue you are facing to check further.

Looking forward to your response.

Thanks.