Files
codeql/csharp/ql/examples/snippets/try_finally.ql
2019-07-26 17:47:11 +02:00

17 lines
312 B
Plaintext

/**
* @id cs/examples/try-finally
* @name Try-finally statements
* @description Finds try-finally statements without a catch clause.
* @tags try
* finally
* catch
* exceptions
*/
import csharp
from TryStmt t
where exists(t.getFinally())
and not exists(t.getACatchClause())
select t