v0.0.209 removed g context from err func
This commit is contained in:
@@ -25,7 +25,7 @@ func Wrap(w *GinWrapper, fn WHandlerFunc) gin.HandlerFunc {
|
||||
Str("trace", stackTrace).
|
||||
Build()
|
||||
|
||||
wrap = Error(g, err)
|
||||
wrap = Error(err)
|
||||
}
|
||||
|
||||
if g.Writer.Written() {
|
||||
|
@@ -52,7 +52,7 @@ func (pctx PreContext) Start() (*AppContext, *gin.Context, *HTTPResponse) {
|
||||
WithType(exerr.TypeBindFailURI).
|
||||
Str("struct_type", fmt.Sprintf("%T", pctx.uri)).
|
||||
Build()
|
||||
return nil, nil, langext.Ptr(Error(pctx.ginCtx, err))
|
||||
return nil, nil, langext.Ptr(Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ func (pctx PreContext) Start() (*AppContext, *gin.Context, *HTTPResponse) {
|
||||
WithType(exerr.TypeBindFailQuery).
|
||||
Str("struct_type", fmt.Sprintf("%T", pctx.query)).
|
||||
Build()
|
||||
return nil, nil, langext.Ptr(Error(pctx.ginCtx, err))
|
||||
return nil, nil, langext.Ptr(Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,13 +73,13 @@ func (pctx PreContext) Start() (*AppContext, *gin.Context, *HTTPResponse) {
|
||||
WithType(exerr.TypeBindFailJSON).
|
||||
Str("struct_type", fmt.Sprintf("%T", pctx.body)).
|
||||
Build()
|
||||
return nil, nil, langext.Ptr(Error(pctx.ginCtx, err))
|
||||
return nil, nil, langext.Ptr(Error(err))
|
||||
}
|
||||
} else {
|
||||
err := exerr.New(exerr.TypeBindFailJSON, "missing JSON body").
|
||||
Str("struct_type", fmt.Sprintf("%T", pctx.body)).
|
||||
Build()
|
||||
return nil, nil, langext.Ptr(Error(pctx.ginCtx, err))
|
||||
return nil, nil, langext.Ptr(Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,13 +90,13 @@ func (pctx PreContext) Start() (*AppContext, *gin.Context, *HTTPResponse) {
|
||||
WithType(exerr.TypeBindFailFormData).
|
||||
Str("struct_type", fmt.Sprintf("%T", pctx.form)).
|
||||
Build()
|
||||
return nil, nil, langext.Ptr(Error(pctx.ginCtx, err))
|
||||
return nil, nil, langext.Ptr(Error(err))
|
||||
}
|
||||
} else {
|
||||
err := exerr.New(exerr.TypeBindFailFormData, "missing form body").
|
||||
Str("struct_type", fmt.Sprintf("%T", pctx.form)).
|
||||
Build()
|
||||
return nil, nil, langext.Ptr(Error(pctx.ginCtx, err))
|
||||
return nil, nil, langext.Ptr(Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ func (pctx PreContext) Start() (*AppContext, *gin.Context, *HTTPResponse) {
|
||||
WithType(exerr.TypeBindFailHeader).
|
||||
Str("struct_type", fmt.Sprintf("%T", pctx.query)).
|
||||
Build()
|
||||
return nil, nil, langext.Ptr(Error(pctx.ginCtx, err))
|
||||
return nil, nil, langext.Ptr(Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user