mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 03:11:30 +00:00
improve the error tips
This commit is contained in:
parent
e65d87974a
commit
9c665afc04
@ -153,7 +153,7 @@ func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingM
|
|||||||
if val := reflectVal.MethodByName(colon[1]); val.IsValid() {
|
if val := reflectVal.MethodByName(colon[1]); val.IsValid() {
|
||||||
methods[strings.ToUpper(m)] = colon[1]
|
methods[strings.ToUpper(m)] = colon[1]
|
||||||
} else {
|
} else {
|
||||||
panic(colon[1] + " method doesn't exist in the controller " + t.Name())
|
panic("'" + colon[1] + "' method doesn't exist in the controller " + t.Name())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
panic(v + " is an invalid method mapping. Method doesn't exist " + m)
|
panic(v + " is an invalid method mapping. Method doesn't exist " + m)
|
||||||
|
Loading…
Reference in New Issue
Block a user