Files
codeql/python/ql/examples/snippets/catch_exception.ql
2019-07-26 17:47:11 +02:00

16 lines
313 B
Plaintext

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