Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve exception error messages for getAddrInfo and getNameInfo
@develop7 ran into an issue with `yesod devel` (yesodweb/yesod#1471) and got the following error message: ``` devel.hs: Network.Socket.getAddrInfo: does not exist (Name or service not known) ``` It would be useful to have a more detailed error message to aid in debugging this exception. The new message looks like this: ``` > getAddrInfo Nothing (Just "127.0.0.1") (Just "foo") *** Exception: Network.Socket.getAddrInfo (called with preferred socket type/protocol: Nothing, host name: Just "127.0.0.1", service name: Just "foo"): does not exist (nodename nor servname provided, or not known) ``` I think a more verbose error message is well worth it, especially since these kind of lower-level, underlying issues can be hard to debug. (I added a similar error message for `getNameInfo` since it was right there)
- Loading branch information