1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-12 00:11:02 +00:00

change SopRun to a variable

This commit is contained in:
astaxie
2013-12-17 08:53:15 +08:00
parent 3a996c132d
commit 7b27b7fed0
2 changed files with 6 additions and 2 deletions

View File

@ -24,6 +24,10 @@ import (
"github.com/astaxie/beego/session"
)
var (
USERSTOPRUN = errors.New("User stop run")
)
type Controller struct {
Ctx *context.Context
Data map[interface{}]interface{}
@ -181,7 +185,7 @@ func (c *Controller) Abort(code string) {
}
func (c *Controller) StopRun() {
panic("StopRun")
panic(USERSTOPRUN)
}
func (c *Controller) UrlFor(endpoint string, values ...string) string {