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

13 lines
160 B
C#

double reciprocal(double input)
{
try
{
return 1 / input;
}
catch
{
// division by zero, return 0
return 0;
}
}