mirror of
https://github.com/srid/rib.git
synced 2024-11-30 03:45:00 +03:00
Have Shake report errors with filename
This commit is contained in:
parent
f8014e92f0
commit
ac07ae7ffe
@ -94,7 +94,13 @@ readDocMulti pat = do
|
|||||||
readDoc
|
readDoc
|
||||||
! #relpath f
|
! #relpath f
|
||||||
! #path (input </> f)
|
! #path (input </> f)
|
||||||
pure $ either (error . showMarkupError @t) id result
|
case result of
|
||||||
|
Left e ->
|
||||||
|
-- FIXME: There is one more place, getDocumentMeta, which throws error
|
||||||
|
-- (and thus not handled here)
|
||||||
|
let es = toString (showMarkupError @t e)
|
||||||
|
in fail $ "Error converting " <> toFilePath f <> " to HTML: " <> es
|
||||||
|
Right v -> pure v
|
||||||
|
|
||||||
-- | Build a single HTML file with the given value
|
-- | Build a single HTML file with the given value
|
||||||
buildHtml :: Path Rel File -> Html () -> Action ()
|
buildHtml :: Path Rel File -> Html () -> Action ()
|
||||||
|
Loading…
Reference in New Issue
Block a user