mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-11 20:43:44 +08:00
优化home模块页面错误处理
This commit is contained in:
@@ -24,7 +24,15 @@ func (a *cSite) Index(ctx context.Context, _ *base.SiteIndexReq) (res *base.Site
|
||||
service.View().Render(ctx, model.View{Data: g.Map{
|
||||
"name": simple.AppName(ctx),
|
||||
"version": consts.VersionApp,
|
||||
"debug": g.Cfg().MustGet(ctx, "hotgo.debug", true),
|
||||
}})
|
||||
|
||||
//err = gerror.New("这是一个测试错误")
|
||||
//return
|
||||
|
||||
//err = gerror.NewCode(gcode.New(10000, "这是一个测试自定义错误码错误", nil))
|
||||
//return
|
||||
|
||||
//service.View().Error(ctx, gerror.New("这是一个允许被自定义格式的错误,默认和通用错误格式一致,你可以修改它"))
|
||||
//return
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user