@@ -367,6 +367,10 @@ predicate scope_raises_unknown(Scope s) {
367367class ExceptFlowNode extends ControlFlowNode {
368368 ExceptFlowNode ( ) { this .getNode ( ) instanceof ExceptStmt }
369369
370+ /**
371+ * Gets the type handled by this exception handler.
372+ * `ExceptionType` in `except ExceptionType as e:`
373+ */
370374 ControlFlowNode getType ( ) {
371375 exists ( ExceptStmt ex |
372376 this .getBasicBlock ( ) .dominates ( result .getBasicBlock ( ) ) and
@@ -375,6 +379,10 @@ class ExceptFlowNode extends ControlFlowNode {
375379 )
376380 }
377381
382+ /**
383+ * Gets the name assigned to the handled exception, if any.
384+ * `e` in `except ExceptionType as e:`
385+ */
378386 ControlFlowNode getName ( ) {
379387 exists ( ExceptStmt ex |
380388 this .getBasicBlock ( ) .dominates ( result .getBasicBlock ( ) ) and
@@ -443,11 +451,19 @@ class ExceptFlowNode extends ControlFlowNode {
443451class ExceptGroupFlowNode extends ControlFlowNode {
444452 ExceptGroupFlowNode ( ) { this .getNode ( ) instanceof ExceptGroupStmt }
445453
454+ /**
455+ * Gets the type handled by this exception handler.
456+ * `eg` in `except* eg as e:`
457+ */
446458 ControlFlowNode getType ( ) {
447459 this .getBasicBlock ( ) .dominates ( result .getBasicBlock ( ) ) and
448460 result = this .getNode ( ) .( ExceptGroupStmt ) .getType ( ) .getAFlowNode ( )
449461 }
450462
463+ /**
464+ * Gets the name assigned to the handled exception, if any.
465+ * `e` in `except* eg as e:`
466+ */
451467 ControlFlowNode getName ( ) {
452468 this .getBasicBlock ( ) .dominates ( result .getBasicBlock ( ) ) and
453469 result = this .getNode ( ) .( ExceptGroupStmt ) .getName ( ) .getAFlowNode ( )
0 commit comments