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:
parent
69dc96860a
commit
3cd4d526c5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user