All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.plugins.csharp.S3984.html Maven / Gradle / Ivy

There is a newer version: 10.2.0.105762
Show newest version

Why is this an issue?

Creating a new Exception without actually throwing does not achieve the intended purpose.

if (x < 0)
{
    new ArgumentException("x must be nonnegative");
}

Ensure to throw the Exception with a throw statement.

if (x < 0)
{
    throw new ArgumentException("x must be nonnegative");
}

Resources

Documentation





© 2015 - 2024 Weber Informatics LLC | Privacy Policy