Files
codeql/csharp/ql/src/Language Abuse/CatchOfGenericExceptionFix.cs
2018-08-02 17:53:23 +01:00

16 lines
220 B
C#

double reciprocal(double input)
{
try
{
return 1 / input;
}
catch (DivideByZeroException)
{
return 0;
}
catch (OverflowException)
{
return double.MaxValue;
}
}