Removed localNoCurrent for error handling
This commit is contained in:
parent
062efc9ae3
commit
77f41a18dd
@ -41,15 +41,6 @@ import Yesod.Core.Internal.Request (parseWaiRequest, tokenKey,
|
|||||||
tooLargeResponse)
|
tooLargeResponse)
|
||||||
import Yesod.Routes.Class (Route, renderRoute)
|
import Yesod.Routes.Class (Route, renderRoute)
|
||||||
|
|
||||||
localNoCurrent :: GHandler s m a -> GHandler s m a
|
|
||||||
localNoCurrent =
|
|
||||||
local (\hd -> hd { handlerEnv = (handlerEnv hd) { rheRoute = Nothing }})
|
|
||||||
|
|
||||||
local :: (HandlerData sub' master' -> HandlerData sub master)
|
|
||||||
-> GHandler sub master a
|
|
||||||
-> GHandler sub' master' a
|
|
||||||
local f (GHandler x) = GHandler $ \r -> x $ f r
|
|
||||||
|
|
||||||
-- | Function used internally by Yesod in the process of converting a
|
-- | Function used internally by Yesod in the process of converting a
|
||||||
-- 'GHandler' into an 'Application'. Should not be needed by users.
|
-- 'GHandler' into an 'Application'. Should not be needed by users.
|
||||||
runHandler :: ToTypedContent c
|
runHandler :: ToTypedContent c
|
||||||
@ -247,7 +238,7 @@ yesodRunner handler' YesodRunnerEnv {..} req
|
|||||||
, rheOnError = safeEh log'
|
, rheOnError = safeEh log'
|
||||||
}
|
}
|
||||||
rhe = rheSafe
|
rhe = rheSafe
|
||||||
{ rheOnError = runHandler rheSafe . localNoCurrent . errorHandler
|
{ rheOnError = runHandler rheSafe . errorHandler
|
||||||
}
|
}
|
||||||
yar <- runHandler rhe handler yreq
|
yar <- runHandler rhe handler yreq
|
||||||
extraHeaders <- case yar of
|
extraHeaders <- case yar of
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user