Commit df6bda79 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[nodeStory] some attempts to fix showing errors for PGS execute

parent bc338e72
Pipeline #3155 passed with stage
in 91 minutes and 28 seconds
......@@ -119,6 +119,7 @@ import System.IO (stderr)
import qualified Data.Map.Strict as Map
import qualified Data.Map.Strict.Patch as PM
import qualified Data.Set as Set
import qualified Data.Text as Text
import qualified Database.PostgreSQL.Simple as PGS
import qualified Gargantext.Database.Query.Table.Ngrams as TableNgrams
......@@ -286,7 +287,7 @@ runPGSExecute c qs a = catch (PGS.execute c qs a) printError
where
printError (SomeException e) = do
--q' <- PGS.formatQuery c qs a
--hPutStrLn stderr q'
_ <- panic $ Text.pack $ show e
throw (SomeException e)
runPGSExecuteMany :: (PGS.ToRow q) => PGS.Connection -> PGS.Query -> [q] -> IO Int64
......@@ -294,7 +295,7 @@ runPGSExecuteMany c qs a = catch (PGS.executeMany c qs a) printError
where
printError (SomeException e) = do
--q' <- PGS.formatQuery c qs a
--hPutStrLn stderr q'
_ <- panic $ Text.pack $ show e
throw (SomeException e)
runPGSQuery :: (PGS.FromRow r, PGS.ToRow q) => PGS.Connection -> PGS.Query -> q -> IO [r]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment