1
1
mirror of https://github.com/srid/rib.git synced 2024-11-26 04:15:35 +03:00

Use try for better error message

This commit is contained in:
Sridhar Ratnakumar 2020-04-09 19:40:28 -04:00
parent 69dc96860a
commit 3cd4d526c5

View File

@ -113,7 +113,7 @@ hostPortParser = do
host <-
optional $
M.string "localhost"
<|> parseIP
<|> M.try parseIP
void $ M.char ':'
port <- parseNumRange 1 65535
pure (fromMaybe "127.0.0.1" host, port)