Files
codeql/csharp/ql/test/query-tests/Bad Practices/EmptyCatchBlock/EmptyCatchBlock.cs
2026-07-07 14:09:48 +01:00

26 lines
318 B
C#

using System;
class EmptyCatchBlock
{
void bad()
{
try
{
}
catch (Exception)
{
} // $ Alert
}
void good()
{
try
{
}
catch (Exception)
{
// GOOD: This catch block should be empty
}
}
}