panic when an extension request is issued before an extension has been initialized. but give a nice error message for the happy people.

This commit is contained in:
Andrew Gallant (Ocelot) 2012-05-11 23:59:38 -04:00
parent 29942bf078
commit aa95801b2d
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ func (r *Request) CheckExt(c *Context) {
}
c.Putln("if _, ok := c.Extensions[\"%s\"]; !ok {",
strings.ToUpper(c.protocol.ExtXName))
c.Putln("panic(\"Cannot issue request '%s' using the uninitialized " +
c.Putln("panic(\"Cannot issue request '%s' using the uninitialized "+
"extension '%s'. %s.Init(connObj) must be called first.\")",
r.SrcName(), c.protocol.ExtXName, c.protocol.PkgName())
c.Putln("}")