@@ -511,14 +511,14 @@ class AssignmentDefinition extends EssaNodeDefinition {
511
511
override string getAPrimaryQlClass ( ) { result = "AssignmentDefinition" }
512
512
}
513
513
514
- /** A capture of a raised exception `except ExceptionType ex:` */
514
+ /** A capture of a raised exception `except ExceptionType as ex:` */
515
515
class ExceptionCapture extends EssaNodeDefinition {
516
516
ExceptionCapture ( ) {
517
517
SsaSource:: exception_capture ( this .getSourceVariable ( ) , this .getDefiningNode ( ) )
518
518
}
519
519
520
520
ControlFlowNode getType ( ) {
521
- exists ( ExceptFlowNode ex |
521
+ exists ( ExceptGroupFlowNode ex |
522
522
ex .getName ( ) = this .getDefiningNode ( ) and
523
523
result = ex .getType ( )
524
524
)
@@ -529,6 +529,24 @@ class ExceptionCapture extends EssaNodeDefinition {
529
529
override string getAPrimaryQlClass ( ) { result = "ExceptionCapture" }
530
530
}
531
531
532
+ /** A capture of a raised exception group `except* ExceptionType as ex:` */
533
+ class ExceptionGroupCapture extends EssaNodeDefinition {
534
+ ExceptionGroupCapture ( ) {
535
+ SsaSource:: exception_group_capture ( this .getSourceVariable ( ) , this .getDefiningNode ( ) )
536
+ }
537
+
538
+ ControlFlowNode getType ( ) {
539
+ exists ( ExceptGroupFlowNode ex |
540
+ ex .getName ( ) = this .getDefiningNode ( ) and
541
+ result = ex .getType ( )
542
+ )
543
+ }
544
+
545
+ override string getRepresentation ( ) { result = "except* " + this .getSourceVariable ( ) .getName ( ) }
546
+
547
+ override string getAPrimaryQlClass ( ) { result = "ExceptionGroupCapture" }
548
+ }
549
+
532
550
/** An assignment to a variable as part of a multiple assignment `..., v, ... = val` */
533
551
class MultiAssignmentDefinition extends EssaNodeDefinition {
534
552
MultiAssignmentDefinition ( ) {
0 commit comments