Sport Error exeception for outside

This commit is contained in:
ysqi 2016-06-01 21:30:04 +08:00
parent b807362c39
commit b7e3402995
1 changed files with 5 additions and 0 deletions

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) {