mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
Move 'snippet' queries to 'snippets' folders
This commit is contained in:
15
python/ql/examples/snippets/catch_exception.ql
Normal file
15
python/ql/examples/snippets/catch_exception.ql
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @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
|
||||
Reference in New Issue
Block a user