Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report host/port in connect exception message #467

Open
yaitskov opened this issue Jul 15, 2020 · 2 comments
Open

Report host/port in connect exception message #467

yaitskov opened this issue Jul 15, 2020 · 2 comments

Comments

@yaitskov
Copy link

Hi,

I propose to append target address to exception message in connect function.
Haskell doesn't have stack trace support as good as java.
It is really hard to figure out where a problem is if an application connects to many places,
because an exception message doesn't have target domain/ip address and port.

connectLoop :: SocketAddress sa => Socket -> Ptr sa -> CInt -> IO ()
connectLoop s p_sa sz = withFdSocket s $ \fd -> loop fd
  where
    errLoc = "Network.Socket.connect: " ++ show s
@kazu-yamamoto
Copy link
Collaborator

Could you implement it by yourself and send us a PR?

@yaitskov
Copy link
Author

#529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants