]> git.rkrishnan.org Git - functorrent.git/blobdiff - src/FuncTorrent/Metainfo.hs
More consistency of types between magneturi/metainfo parsing
[functorrent.git] / src / FuncTorrent / Metainfo.hs
index 05c9de571097142b861f88f1fd50e071ca075ca2..93540823fc47a97a6606342c71fa2d7525764f99 100644 (file)
@@ -129,5 +129,6 @@ getAnnounceList (Just (Bdict _)) = []
 torrentToMetainfo :: ByteString -> Either String Metainfo
 torrentToMetainfo s =
   case decode s of
-   Right d -> mkMetaInfo d
-   Left e -> Left $ show e
+    Right d -> mkMetaInfo d
+    Left e -> Left (show "Cannot parse the torrent file: " ++ show e)
+