Skip to content

Commit

Permalink
fix plugin onerror (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
dchaofei authored Jun 20, 2022
1 parent c60c4b0 commit 0336b53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wechaty/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (p *Plugin) registerPluginEvent(wechaty *Wechaty) {
if err := recover(); err != nil {
log.Println("panic: ", err)
log.Println(string(debug.Stack()))
wechaty.events.Emit(schemas.PuppetEventNameError, fmt.Errorf("panic: event %s %v", pluginEvent.name, err))
wechaty.events.Emit(schemas.PuppetEventNameError, NewContext(), fmt.Errorf("panic: event %s %v", pluginEvent.name, err))
}
}()
values := make([]reflect.Value, 0, len(data))
Expand Down

0 comments on commit 0336b53

Please sign in to comment.