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).
|
Str("trace", stackTrace).
|
||||||
Build()
|
Build()
|
||||||
|
|
||||||
wrap = Error(g, err)
|
wrap = Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if g.Writer.Written() {
|
if g.Writer.Written() {
|
||||||
|
@ -52,7 +52,7 @@ func (pctx PreContext) Start() (*AppContext, *gin.Context, *HTTPResponse) {
|
|||||||
WithType(exerr.TypeBindFailURI).
|
WithType(exerr.TypeBindFailURI).
|
||||||
Str("struct_type", fmt.Sprintf("%T", pctx.uri)).
|
Str("struct_type", fmt.Sprintf("%T", pctx.uri)).
|
||||||
Build()
|
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).
|
WithType(exerr.TypeBindFailQuery).
|
||||||
Str("struct_type", fmt.Sprintf("%T", pctx.query)).
|
Str("struct_type", fmt.Sprintf("%T", pctx.query)).
|
||||||
Build()
|
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).
|
WithType(exerr.TypeBindFailJSON).
|
||||||
Str("struct_type", fmt.Sprintf("%T", pctx.body)).
|
Str("struct_type", fmt.Sprintf("%T", pctx.body)).
|
||||||
Build()
|
Build()
|
||||||
return nil, nil, langext.Ptr(Error(pctx.ginCtx, err))
|
return nil, nil, langext.Ptr(Error(err))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
err := exerr.New(exerr.TypeBindFailJSON, "missing JSON body").
|
err := exerr.New(exerr.TypeBindFailJSON, "missing JSON body").
|
||||||
Str("struct_type", fmt.Sprintf("%T", pctx.body)).
|
Str("struct_type", fmt.Sprintf("%T", pctx.body)).
|
||||||
Build()
|
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).
|
WithType(exerr.TypeBindFailFormData).
|
||||||
Str("struct_type", fmt.Sprintf("%T", pctx.form)).
|
Str("struct_type", fmt.Sprintf("%T", pctx.form)).
|
||||||
Build()
|
Build()
|
||||||
return nil, nil, langext.Ptr(Error(pctx.ginCtx, err))
|
return nil, nil, langext.Ptr(Error(err))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
err := exerr.New(exerr.TypeBindFailFormData, "missing form body").
|
err := exerr.New(exerr.TypeBindFailFormData, "missing form body").
|
||||||
Str("struct_type", fmt.Sprintf("%T", pctx.form)).
|
Str("struct_type", fmt.Sprintf("%T", pctx.form)).
|
||||||
Build()
|
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).
|
WithType(exerr.TypeBindFailHeader).
|
||||||
Str("struct_type", fmt.Sprintf("%T", pctx.query)).
|
Str("struct_type", fmt.Sprintf("%T", pctx.query)).
|
||||||
Build()
|
Build()
|
||||||
return nil, nil, langext.Ptr(Error(pctx.ginCtx, err))
|
return nil, nil, langext.Ptr(Error(err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package goext
|
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