Merge branch 'master' into develop
Showing
1 changed file
with
5 additions
and
0 deletions
| ... | @@ -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) | ... | ... |
-
Please register or sign in to post a comment