436edda9 by astaxie

Merge branch 'master' into develop

2 parents ae37f952 1f1190fb
...@@ -272,6 +272,11 @@ func (c *Controller) Abort(code string) { ...@@ -272,6 +272,11 @@ func (c *Controller) Abort(code string) {
272 } 272 }
273 } 273 }
274 274
275 // CustomAbort stops controller handler and show the error data, it's similar Aborts, but support status code and body.
276 func (c *Controller) CustomAbort(status int, body string) {
277 c.Ctx.Abort(status, body)
278 }
279
275 // StopRun makes panic of USERSTOPRUN error and go to recover function if defined. 280 // StopRun makes panic of USERSTOPRUN error and go to recover function if defined.
276 func (c *Controller) StopRun() { 281 func (c *Controller) StopRun() {
277 panic(USERSTOPRUN) 282 panic(USERSTOPRUN)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!