improve rendering of newOSError.additionalInfo (#18443)
* improve rendering of newOSError.additionalInfo * fixup
This commit is contained in:
parent
3eb3e6b9a3
commit
ffce6de84c
2 changed files with 6 additions and 3 deletions
|
|
@ -958,7 +958,9 @@ proc bindAddr*(socket: Socket, port = Port(0), address = "") {.
|
|||
var aiList = getAddrInfo(realaddr, port, socket.domain)
|
||||
if bindAddr(socket.fd, aiList.ai_addr, aiList.ai_addrlen.SockLen) < 0'i32:
|
||||
freeaddrinfo(aiList)
|
||||
raiseOSError(osLastError(), "address: $# port: $#" % [address, $port])
|
||||
var address2: string
|
||||
address2.addQuoted address
|
||||
raiseOSError(osLastError(), "address: $# port: $#" % [address2, $port])
|
||||
freeaddrinfo(aiList)
|
||||
|
||||
proc acceptAddr*(server: Socket, client: var owned(Socket), address: var string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue