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:
parent
29942bf078
commit
aa95801b2d
|
@ -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("}")
|
||||
|
|
Loading…
Reference in New Issue