9c665afc by astaxie

improve the error tips

1 parent e65d8797
...@@ -153,7 +153,7 @@ func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingM ...@@ -153,7 +153,7 @@ func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingM
153 if val := reflectVal.MethodByName(colon[1]); val.IsValid() { 153 if val := reflectVal.MethodByName(colon[1]); val.IsValid() {
154 methods[strings.ToUpper(m)] = colon[1] 154 methods[strings.ToUpper(m)] = colon[1]
155 } else { 155 } else {
156 panic(colon[1] + " method doesn't exist in the controller " + t.Name()) 156 panic("'" + colon[1] + "' method doesn't exist in the controller " + t.Name())
157 } 157 }
158 } else { 158 } else {
159 panic(v + " is an invalid method mapping. Method doesn't exist " + m) 159 panic(v + " is an invalid method mapping. Method doesn't exist " + m)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!