Skip to content

Commit 30df86b

Browse files
committed
improve the error message
1 parent 80fadc1 commit 30df86b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Network/Socket/Info.hsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ getAddrInfoList hints node service =
313313

314314
followAddrInfo :: Ptr AddrInfo -> IO (NonEmpty AddrInfo)
315315
followAddrInfo ptr_ai
316-
| ptr_ai == nullPtr = error "fixme"
316+
| ptr_ai == nullPtr = ioError $ mkIOError NoSuchThing "getaddrinfo must retuan at least one addrinfo" Nothing Nothing
317317
| otherwise = do
318318
a <- peek ptr_ai
319319
ptr <- (# peek struct addrinfo, ai_next) ptr_ai

0 commit comments

Comments
 (0)