覆盖系统内置异常处理
func errorFunc() gin.HandlerFunc {
return func(c *gin.Context) {
defer func() {
if e := recover(); e != nil {
c.AbortWithStatusJSON(400, gin.H{"my": e})
}
}()
c.Next()
}
}goft.Ignite( errorFunc()).
Lanunch()最后更新于