mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 17:21:02 +00:00
Sport Error exeception for outside
This commit is contained in:
parent
b807362c39
commit
b7e3402995
5
error.go
5
error.go
@ -380,6 +380,11 @@ func ErrorController(c ControllerInterface) *App {
|
|||||||
return BeeApp
|
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.
|
// show error string as simple text message.
|
||||||
// if error string is empty, show 503 or 500 error as default.
|
// if error string is empty, show 503 or 500 error as default.
|
||||||
func exception(errCode string, ctx *context.Context) {
|
func exception(errCode string, ctx *context.Context) {
|
||||||
|
Loading…
Reference in New Issue
Block a user