Exception
in the catch clause CS-R1036Exception handling is all about error handling and recovery which can vary depending on the exception that is being caught. In this case, while the exception that is being caught is specific, the catch clause contains one or more throw
statements where the exception that is being thrown is generic, i.e. the exception is generalized. It is recommended that you refactor this and throw a specific exception instead.
try
{
// Some operation
}
catch (ArgumentException)
{
// ...
throw new Exception(/* */);
}
try
{
// Some operation
}
catch (ArgumentException)
{
// ...
throw new SomeOtherException(/* */);
}