mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 19:10:54 +00:00
Merge pull request #2846 from hikenote/master
return template build error rather than log error
This commit is contained in:
commit
520753415f
@ -160,11 +160,14 @@ func (rp *Provider) SessionInit(maxlifetime int64, savePath string) error {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//some redis proxy such as twemproxy is not support select command
|
||||||
|
if rp.dbNum > 0 {
|
||||||
_, err = c.Do("SELECT", rp.dbNum)
|
_, err = c.Do("SELECT", rp.dbNum)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Close()
|
c.Close()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return c, err
|
return c, err
|
||||||
}, rp.poolsize)
|
}, rp.poolsize)
|
||||||
|
|
||||||
|
@ -218,6 +218,7 @@ func BuildTemplate(dir string, files ...string) error {
|
|||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logs.Error("parse template err:", file, err)
|
logs.Error("parse template err:", file, err)
|
||||||
|
return err
|
||||||
} else {
|
} else {
|
||||||
beeTemplates[file] = t
|
beeTemplates[file] = t
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user