mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
14 lines
309 B
Plaintext
14 lines
309 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()
|