From cb4db8b9d53dcdfc5a927d5146d21c5c85d955cb Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Mon, 7 Mar 2011 11:14:20 +0100 Subject: Throw nice error in cached --- src/Hakyll/Core/Compiler.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Hakyll') diff --git a/src/Hakyll/Core/Compiler.hs b/src/Hakyll/Core/Compiler.hs index 5fb7b01..371594f 100644 --- a/src/Hakyll/Core/Compiler.hs +++ b/src/Hakyll/Core/Compiler.hs @@ -275,9 +275,9 @@ cached name (Compiler d j) = Compiler d $ const $ CompilerM $ do return v else do v <- liftIO $ storeGet store name identifier case v of Just v' -> return v' - Nothing -> error' + Nothing -> throwError error' where - error' = error "Hakyll.Core.Compiler.cached: Cache corrupt!" + error' = "Hakyll.Core.Compiler.cached: Cache corrupt!" -- | Create an unsafe compiler from a function in IO -- -- cgit v1.2.3