Skip to content

Commit 0336b53

Browse files
authored
fix plugin onerror (#135)
1 parent c60c4b0 commit 0336b53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wechaty/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (p *Plugin) registerPluginEvent(wechaty *Wechaty) {
5353
if err := recover(); err != nil {
5454
log.Println("panic: ", err)
5555
log.Println(string(debug.Stack()))
56-
wechaty.events.Emit(schemas.PuppetEventNameError, fmt.Errorf("panic: event %s %v", pluginEvent.name, err))
56+
wechaty.events.Emit(schemas.PuppetEventNameError, NewContext(), fmt.Errorf("panic: event %s %v", pluginEvent.name, err))
5757
}
5858
}()
5959
values := make([]reflect.Value, 0, len(data))

0 commit comments

Comments
 (0)