We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ab296d4 + d102a84 commit 36f8b05Copy full SHA for 36f8b05
python/ql/src/Exceptions/CatchingBaseException.ql
@@ -13,11 +13,12 @@
13
*/
14
15
import python
16
+import semmle.python.ApiGraphs
17
18
predicate doesnt_reraise(ExceptStmt ex) { ex.getAFlowNode().getBasicBlock().reachesExit() }
19
20
predicate catches_base_exception(ExceptStmt ex) {
- ex.getType().pointsTo(ClassValue::baseException())
21
+ ex.getType() = API::builtin("BaseException").getAValueReachableFromSource().asExpr()
22
or
23
not exists(ex.getType())
24
}
0 commit comments