Skip to content

Report host/port in connect exception message #467

@yaitskov

Description

@yaitskov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions