display sqlite error message when it crashes

This commit is contained in:
Joey Hess 2019-10-24 11:50:55 -04:00
parent 168f91efec
commit 098afe144e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -99,7 +99,7 @@ queryDb (DbHandle _ _ jobs) a = do
putMVar jobs $ QueryJob $
liftIO . putMVar res =<< tryNonAsync a
(either throwIO return =<< takeMVar res)
`catchNonAsync` (const $ error "sqlite query crashed")
`catchNonAsync` (\e -> error $ "sqlite query crashed: " ++ show e)
{- Writes a change to the database.
-