diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-11-05 20:20:19 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-11-05 20:20:19 +0300 |
commit | 56115491d0dce58bf06f92fd5022363eb05a3755 (patch) | |
tree | 9bafaf76967eae6596d0959cf7a6a874006ba97e /cli/Main.hs | |
parent | cef7ecfd83612f8cac4560034b3e01988f27c7ec (diff) | |
download | zerobin-56115491d0dce58bf06f92fd5022363eb05a3755.tar.gz |
Throw ZeroBinError instead of return Either
It can throw HttpException anyway
Diffstat (limited to 'cli/Main.hs')
-rw-r--r-- | cli/Main.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/cli/Main.hs b/cli/Main.hs index 5d6b445..bcd7d54 100644 --- a/cli/Main.hs +++ b/cli/Main.hs @@ -72,9 +72,5 @@ main = do cnt <- getContent (args `O.isPresent` O.longOption "file") text case getExpiration expire of Nothing -> die "invalid value for expiration" - Just e -> do - rc <- share bin e cnt - case rc of - Left err -> die err - Right uri -> putStrLn uri + Just e -> share bin e cnt >>= putStrLn |