mirror of
https://github.com/github/codeql.git
synced 2026-03-23 07:56:54 +01:00
14 lines
406 B
Plaintext
14 lines
406 B
Plaintext
/**
|
|
* @name Test for try catches
|
|
*/
|
|
import csharp
|
|
|
|
from Method m, TryStmt s
|
|
where s.getEnclosingCallable() = m
|
|
and m.getName() = "MainTryThrow"
|
|
and count((GeneralCatchClause)s.getACatchClause()) = 1
|
|
and count((SpecificCatchClause)s.getACatchClause()) = 1
|
|
and s.getCatchClause(0) instanceof SpecificCatchClause
|
|
and s.getCatchClause(1) instanceof GeneralCatchClause
|
|
select s, s.getACatchClause()
|