Files
codeql/csharp/ql/examples/snippets/try_finally.ql
2019-08-02 15:30:32 +02:00

18 lines
314 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