From 30df86b35f1c129c99d2412fc2755cf1448aa476 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Wed, 4 Sep 2024 07:12:52 +0900 Subject: [PATCH] improve the error message --- Network/Socket/Info.hsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Network/Socket/Info.hsc b/Network/Socket/Info.hsc index 3ebba95f..260b42aa 100644 --- a/Network/Socket/Info.hsc +++ b/Network/Socket/Info.hsc @@ -313,7 +313,7 @@ getAddrInfoList hints node service = followAddrInfo :: Ptr AddrInfo -> IO (NonEmpty AddrInfo) followAddrInfo ptr_ai - | ptr_ai == nullPtr = error "fixme" + | ptr_ai == nullPtr = ioError $ mkIOError NoSuchThing "getaddrinfo must retuan at least one addrinfo" Nothing Nothing | otherwise = do a <- peek ptr_ai ptr <- (# peek struct addrinfo, ai_next) ptr_ai