diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-06-11 06:00:57 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-06-11 06:00:57 +0400 |
commit | 1b4fdf35dd6c21d600130c42a1bcb5c56b25afa6 (patch) | |
tree | 136bb1467f5d3b5929620ddb0ab2adffc656504d /tests/InfoHash.hs | |
parent | a6490c275b6c688df1f654bff92f96aaeb998805 (diff) |
~ Use exception in fromFile.
Again, the problem is that one function returns errors in two different
ways: Either and IO exceptions. It's better to just throw exception in
either case.
Diffstat (limited to 'tests/InfoHash.hs')
-rw-r--r-- | tests/InfoHash.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/InfoHash.hs b/tests/InfoHash.hs index dbbcbf53..3f5a1432 100644 --- a/tests/InfoHash.hs +++ b/tests/InfoHash.hs | |||
@@ -19,7 +19,7 @@ main = do | |||
19 | args <- getArgs | 19 | args <- getArgs |
20 | let path = if length args == 0 then torrentFileName else head args | 20 | let path = if length args == 0 then torrentFileName else head args |
21 | 21 | ||
22 | Right t <- fromFile path | 22 | t <- fromFile path |
23 | 23 | ||
24 | BC.putStr "info hash: " | 24 | BC.putStr "info hash: " |
25 | print (ppInfoHash (tInfoHash t)) | 25 | print (ppInfoHash (tInfoHash t)) |