@@ -511,14 +511,14 @@ class AssignmentDefinition extends EssaNodeDefinition {
511511 override string getAPrimaryQlClass ( ) { result = "AssignmentDefinition" }
512512}
513513
514- /** A capture of a raised exception `except ExceptionType ex:` */
514+ /** A capture of a raised exception `except ExceptionType as ex:` */
515515class ExceptionCapture extends EssaNodeDefinition {
516516 ExceptionCapture ( ) {
517517 SsaSource:: exception_capture ( this .getSourceVariable ( ) , this .getDefiningNode ( ) )
518518 }
519519
520520 ControlFlowNode getType ( ) {
521- exists ( ExceptFlowNode ex |
521+ exists ( ExceptGroupFlowNode ex |
522522 ex .getName ( ) = this .getDefiningNode ( ) and
523523 result = ex .getType ( )
524524 )
@@ -529,6 +529,24 @@ class ExceptionCapture extends EssaNodeDefinition {
529529 override string getAPrimaryQlClass ( ) { result = "ExceptionCapture" }
530530}
531531
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+
532550/** An assignment to a variable as part of a multiple assignment `..., v, ... = val` */
533551class MultiAssignmentDefinition extends EssaNodeDefinition {
534552 MultiAssignmentDefinition ( ) {
0 commit comments