Skip to content

Commit

Permalink
Merge pull request #404 from jcristovao/master
Browse files Browse the repository at this point in the history
Addresses  Postgresql exceptions #353
  • Loading branch information
snoyberg committed May 28, 2015
2 parents f6d6919 + 0242ad2 commit 7a1024a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions persistent-postgresql/Database/Persist/Postgresql.hs
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,7 @@ withStmt' conn query vals =
status <- LibPQ.resultStatus ret
case status of
LibPQ.TuplesOk -> return ()
_ -> do
msg <- LibPQ.resStatus status
mmsg <- LibPQ.resultErrorMessage ret
fail $ "Postgresql.withStmt': bad result status " ++
show status ++ " (" ++ maybe (show msg) (show . (,) msg) mmsg ++ ")"
_ -> PG.throwResultError "Postgresql.withStmt': bad result status " ret status

-- Get number and type of columns
cols <- LibPQ.nfields ret
Expand Down

0 comments on commit 7a1024a

Please sign in to comment.