The Recovery() middleware should not print the errors (only panics)

This commit is contained in:
Manu Mtz-Almeida 2014-07-04 04:32:43 +02:00
parent 91df54a5c2
commit fa80b047f9

View File

@ -82,9 +82,6 @@ func function(pc uintptr) []byte {
func Recovery() HandlerFunc {
return func(c *Context) {
defer func() {
if len(c.Errors) > 0 {
log.Println(c.Errors.String())
}
if err := recover(); err != nil {
stack := stack(3)
log.Printf("PANIC: %s\n%s", err, stack)