Fully qualified errors
commitdf8e221aef147ded6e8fe7331619913cc2f51513
authorJasper Van der Jeugt <jaspervdj@gmail.com>
dateSat 8 Jan 2011, 09:09 (16 years ago)
parentd093910
src/Hakyll/Core/CompiledItem.hs+1−1
@@ -36,4 +36,4 @@ unCompiledItem :: (Binary a, Typeable a, Writable a)
3636 -> a
3737unCompiledItem (CompiledItem x) = case cast x of
3838 Just x' -> x'
39− Nothing -> error "unCompiledItem: Unsupported type"
39+ Nothing -> error "Hakyll.Core.CompiledItem.unCompiledItem: Unsupported type"
src/Hakyll/Core/DirectedGraph/DependencySolver.hs+4−1
@@ -60,8 +60,11 @@ order temp stack set graph@(DirectedGraph graph')
6060 -- one first...
6161 (dep : _) -> if (nodeTag dep) `S.member` set
6262 -- The dependency is already in our stack - cycle detected!
63− then error "order: Cycle detected!" -- TODO: Dump cycle
63+ then cycleError
6464 -- Continue with the dependency
6565 else order temp (dep : node : stackTail)
6666 (S.insert (nodeTag dep) set)
6767 graph
68+ where
69+ cycleError = error $ "Hakyll.Core.DirectedGraph.DependencySolver.order: "
70+ ++ "Cycle detected!" -- TODO: Dump cycle
src/Hakyll/Core/DirectedGraph/Internal.hs+4−1
@@ -24,8 +24,11 @@ data Node a = Node
2424--
2525appendNodes :: Ord a => Node a -> Node a -> Node a
2626appendNodes (Node t1 n1) (Node t2 n2)
27− | t1 /= t2 = error "appendNodes: Appending differently tagged nodes"
27+ | t1 /= t2 = error'
2828 | otherwise = Node t1 (n1 `S.union` n2)
29+ where
30+ error' = error $ "Hakyll.Core.DirectedGraph.Internal.appendNodes: "
31+ ++ "Appending differently tagged nodes"
2932
3033-- | Type used to represent a directed graph
3134--
src/Hakyll/Web/Pandoc.hs+1−1
@@ -50,7 +50,7 @@ readPandocWith state fileType' = case fileType' of
5050 Markdown -> P.readMarkdown state
5151 Rst -> P.readRST state
5252 t -> error $
53− "readPandoc: I don't know how to read " ++ show t
53+ "Hakyll.Web.readPandocWith: I don't know how to read " ++ show t
5454
5555-- | Write a document (as HTML) using pandoc, with the default options
5656--
src/Hakyll/Web/Template/Internal.hs+2−1
@@ -41,4 +41,5 @@ instance Binary TemplateElement where
4141 0 -> Chunk <$> get
4242 1 -> Identifier <$> get
4343 2 -> Escaped <$> get
44− _ -> error "Error reading cached template"
44+ _ -> error $ "Hakyll.Web.Template.Internal: "
45+ ++ "Error reading cached template"