1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 01:50:49 +00:00

Sport Error exeception for outside

This commit is contained in:
ysqi 2016-06-01 21:30:04 +08:00
parent b807362c39
commit b7e3402995

View File

@ -380,6 +380,11 @@ func ErrorController(c ControllerInterface) *App {
return BeeApp
}
// Exception Write HttpStatus with errCode and Exec error handler if exist.
func Exception(errCode uint64, ctx *context.Context) {
exception(strconv.FormatUint(errCode, 10), ctx)
}
// show error string as simple text message.
// if error string is empty, show 503 or 500 error as default.
func exception(errCode string, ctx *context.Context) {