diff options
author | Joey Hess <joey@kitenet.net> | 2013-12-06 15:15:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-12-06 15:15:47 -0400 |
commit | 594d28725e37abbd4c5fbd960c9f935d201ed78f (patch) | |
tree | 9b3fb05b57892b9f0d4cb4f7370eb2dbd3fba52c | |
parent | 838d717d4748b8a4354ca95fd8b10b0426352c28 (diff) |
error reporting
-rw-r--r-- | Build/EvilLinker.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Build/EvilLinker.hs b/Build/EvilLinker.hs index b7c4a58ff..a6889aa69 100644 --- a/Build/EvilLinker.hs +++ b/Build/EvilLinker.hs @@ -114,7 +114,9 @@ getOutput cmd params env = do processTranscript' cmd params env Nothing runParser' :: Parser a -> String -> a -runParser' p s = either (error . show) id (parse p "" s) +runParser' p s = either failedparse id (parse p "" s) + where + failedparse e = error $ (show e) ++ "\nInput:\n" ++ s atFile :: FilePath -> String atFile f = '@':f |