Throw nice error in cached
commitcb4db8b9d53dcdfc5a927d5146d21c5c85d955cb
authorJasper Van der Jeugt <jaspervdj@gmail.com>
dateMon 7 Mar 2011, 11:14 (16 years ago)
parentb9bc7f9
src/Hakyll/Core/Compiler.hs+2−2
@@ -275,9 +275,9 @@ cached name (Compiler d j) = Compiler d $ const $ CompilerM $ do
275275 return v
276276 else do v <- liftIO $ storeGet store name identifier
277277 case v of Just v' -> return v'
278− Nothing -> error'
278+ Nothing -> throwError error'
279279 where
280− error' = error "Hakyll.Core.Compiler.cached: Cache corrupt!"
280+ error' = "Hakyll.Core.Compiler.cached: Cache corrupt!"
281281
282282-- | Create an unsafe compiler from a function in IO
283283--