@@ -682,7 +682,7 @@ func (fs *FrameSession) onExecutionContextCreated(event *cdpruntime.EventExecuti
682682 Type string `json:"type"`
683683 }
684684 if err := json .Unmarshal (auxData , & i ); err != nil {
685- k6ext .Panic (fs .ctx , "unmarshaling executionContextCreated event JSON: %w" , err )
685+ k6ext .Panicf (fs .ctx , "unmarshaling executionContextCreated event JSON: %w" , err )
686686 }
687687
688688 frame , ok := fs .manager .getFrameByID (i .FrameID )
@@ -767,7 +767,7 @@ func (fs *FrameSession) onFrameDetached(frameID cdp.FrameID, reason cdppage.Fram
767767 fs .session .ID (), fs .targetID , frameID , reason )
768768
769769 if err := fs .manager .frameDetached (frameID , reason ); err != nil {
770- k6ext .Panic (fs .ctx , "handling frameDetached event: %w" , err )
770+ k6ext .Panicf (fs .ctx , "handling frameDetached event: %w" , err )
771771 }
772772}
773773
@@ -780,7 +780,7 @@ func (fs *FrameSession) onFrameNavigated(frame *cdp.Frame, initial bool) {
780780 frame .ID , frame .ParentID , frame .LoaderID .String (),
781781 frame .Name , frame .URL + frame .URLFragment , initial )
782782 if err != nil {
783- k6ext .Panic (fs .ctx , "handling frameNavigated event to %q: %w" ,
783+ k6ext .Panicf (fs .ctx , "handling frameNavigated event to %q: %w" ,
784784 frame .URL + frame .URLFragment , err )
785785 }
786786
@@ -855,7 +855,7 @@ func (fs *FrameSession) onFrameRequestedNavigation(event *cdppage.EventFrameRequ
855855 if event .Disposition == "currentTab" {
856856 err := fs .manager .frameRequestedNavigation (event .FrameID , event .URL , "" )
857857 if err != nil {
858- k6ext .Panic (fs .ctx , "handling frameRequestedNavigation event to %q: %w" , event .URL , err )
858+ k6ext .Panicf (fs .ctx , "handling frameRequestedNavigation event to %q: %w" , event .URL , err )
859859 }
860860 }
861861}
@@ -995,7 +995,7 @@ func (fs *FrameSession) onAttachedToTarget(event *target.EventAttachedToTarget)
995995 return // ignore
996996 }
997997 reason = "fatal"
998- k6ext .Panic (fs .ctx , "attaching %v: %w" , ti .Type , err )
998+ k6ext .Panicf (fs .ctx , "attaching %v: %w" , ti .Type , err )
999999 }
10001000}
10011001
@@ -1064,7 +1064,7 @@ func (fs *FrameSession) onTargetCrashed() {
10641064 // TODO:?
10651065 s , ok := fs .session .(* Session )
10661066 if ! ok {
1067- k6ext .Panic (fs .ctx , "unexpected type %T" , fs .session )
1067+ k6ext .Panicf (fs .ctx , "unexpected type %T" , fs .session )
10681068 }
10691069 s .markAsCrashed ()
10701070}
0 commit comments