mirror of
https://github.com/github/codeql.git
synced 2025-12-19 18:33:16 +01:00
16 lines
361 B
Plaintext
16 lines
361 B
Plaintext
/**
|
|
* @name Test for try catches
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from Method m, TryStmt s, SpecificCatchClause c, LocalVariable v
|
|
where
|
|
s.getEnclosingCallable() = m and
|
|
m.getName() = "MainTryThrow" and
|
|
s.getCatchClause(0) = c and
|
|
c.getVariable() = v and
|
|
v.getName() = "e" and
|
|
v.getType().getName() = "Exception"
|
|
select c, c.getCaughtExceptionType().toString()
|