Files
codeql/python/ql/examples/snippets/catch_exception.ql
2019-08-08 10:55:45 +01:00

17 lines
347 B
Plaintext

/**
* @id py/examples/catch-exception
* @name Handle exception of given class
* @description Finds places where we handle MyExceptionClass exceptions
* @tags catch
* try
* exception
*/
import python
from ExceptStmt ex, ClassValue cls
where
cls.getName() = "MyExceptionClass" and
ex.getType().pointsTo(cls)
select ex