mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-27 11:17:29 +02:00
v0.26.0
This commit is contained in:
@@ -81,7 +81,7 @@ func (handler *EventHandler) match(event watcher.Event, route *route.Route) bool
|
||||
func (handler *EventHandler) Add(parent task.Parent, route *route.Route) {
|
||||
err := handler.provider.startRoute(parent, route)
|
||||
if err != nil {
|
||||
handler.errs.Add(err.Subject("add"))
|
||||
handler.errs.AddSubjectf(err, "add")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,12 +93,12 @@ func (handler *EventHandler) Update(parent task.Parent, oldRoute *route.Route, n
|
||||
oldRoute.FinishAndWait("route update")
|
||||
err := handler.provider.startRoute(parent, newRoute)
|
||||
if err != nil {
|
||||
handler.errs.Add(err.Subject("update"))
|
||||
handler.errs.AddSubjectf(err, "update")
|
||||
}
|
||||
}
|
||||
|
||||
func (handler *EventHandler) Log() {
|
||||
if err := handler.errs.Error(); err != nil {
|
||||
handler.provider.Logger().Info().Msg(err.Error())
|
||||
handler.provider.Logger().Error().Msg(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user