hpqtypes 1.10.0.0 → 1.10.0.1
raw patch · 3 files changed
+8/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
CHANGELOG.md view
@@ -1,3 +1,6 @@+# hpqtypes-1.10.0.1 (2022-09-23)+* Provide detailed error when `openConnection` fails.+ # hpqtypes-1.10.0.0 (2022-09-14) * Improve `Show` instances of `HPQTypesError` and `LibPQError`. * Remove `INLINE` and `INLINABLE` pragmas.
hpqtypes.cabal view
@@ -1,5 +1,5 @@ name: hpqtypes-version: 1.10.0.0+version: 1.10.0.1 synopsis: Haskell bindings to libpqtypes description: Efficient and easy-to-use bindings to (slightly modified)
src/Database/PostgreSQL/PQTypes/Internal/Connection.hs view
@@ -216,7 +216,10 @@ if | ps == c_PGRES_POLLING_READING -> (threadWaitRead =<< getFd conn) >> loop | ps == c_PGRES_POLLING_WRITING -> (threadWaitWrite =<< getFd conn) >> loop | ps == c_PGRES_POLLING_OK -> return conn- | otherwise -> throwError "openConnection failed"+ | otherwise -> do+ merr <- c_PQerrorMessage conn >>= safePeekCString+ let reason = maybe "" (\err -> ": " <> err) merr+ throwError $ "openConnection failed" <> reason where getFd conn = do fd <- c_PQsocket conn