From 77f41a18ddf20628e61133ece3cb5ce62b2a6c27 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 12 Mar 2013 10:33:02 +0200 Subject: [PATCH] Removed localNoCurrent for error handling --- yesod-core/Yesod/Core/Internal/Run.hs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/yesod-core/Yesod/Core/Internal/Run.hs b/yesod-core/Yesod/Core/Internal/Run.hs index dc0182e4..94f07a14 100644 --- a/yesod-core/Yesod/Core/Internal/Run.hs +++ b/yesod-core/Yesod/Core/Internal/Run.hs @@ -41,15 +41,6 @@ import Yesod.Core.Internal.Request (parseWaiRequest, tokenKey, tooLargeResponse) 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 -- 'GHandler' into an 'Application'. Should not be needed by users. runHandler :: ToTypedContent c @@ -247,7 +238,7 @@ yesodRunner handler' YesodRunnerEnv {..} req , rheOnError = safeEh log' } rhe = rheSafe - { rheOnError = runHandler rheSafe . localNoCurrent . errorHandler + { rheOnError = runHandler rheSafe . errorHandler } yar <- runHandler rhe handler yreq extraHeaders <- case yar of