1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-05 00:58:47 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-04-02 14:19:39 -07:00
parent be5148ae27
commit b5d6c05101
22 changed files with 266 additions and 300 deletions

View File

@ -49,8 +49,8 @@ func RecoverFromConfig(config RecoverConfig) echo.MiddlewareFunc {
config.StackSize = DefaultRecoverConfig.StackSize
}
return func(next echo.Handler) echo.Handler {
return echo.HandlerFunc(func(c echo.Context) error {
return func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
defer func() {
if r := recover(); r != nil {
var err error
@ -68,7 +68,7 @@ func RecoverFromConfig(config RecoverConfig) echo.MiddlewareFunc {
c.Error(err)
}
}()
return next.Handle(c)
})
return next(c)
}
}
}