v0.0.209 removed g context from err func
This commit is contained in:
parent
493c6ebae8
commit
15a4b2a713
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
package goext
|
||||
|
||||
const GoextVersion = "0.0.208"
|
||||
const GoextVersion = "0.0.209"
|
||||
|
||||
const GoextVersionTimestamp = "2023-07-25T10:51:14+0200"
|
||||
const GoextVersionTimestamp = "2023-07-25T10:56:03+0200"
|
||||
|
Loading…
Reference in New Issue
Block a user