Files
codeql/csharp/ql/test/library-tests/statements/TryCatch4.ql
2018-08-02 17:53:23 +01:00

12 lines
306 B
Plaintext

/**
* @name Test for try catches
*/
import csharp
from Method m, TryStmt s, SpecificCatchClause c
where s.getEnclosingCallable() = m
and m.getName() = "MainTryThrow"
and s.getCatchClause(0) = c
and c.getCaughtExceptionType().getName() = "Exception"
select c, c.getCaughtExceptionType().toString()