Skip to content

Commit

Permalink
Better error message for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
csicar committed Mar 3, 2021
1 parent d9eb72c commit 2475ea1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Purepur/Generate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ generateTestFromMarkdown title (Just comment) = do
--TODO: warn user about ignored expr
error $ "unused expression: " <> show expr
commandsToDocument title [] = mempty
commandsToDocument title (ExpectedOutput str: rest) =
error $ "Could not translate doctest comment: Found expected output " <> show str <> ", but no matching command."
<> " Maybe you missed a `>`? "

generateTestFromMarkdownFile :: (FilePath, T.Text) -> Except ParseError (PurepurDocument, P.ModuleName)
generateTestFromMarkdownFile (path, textContent) = do
Expand Down

0 comments on commit 2475ea1

Please sign in to comment.