better error handling which always reports the right file name

This commit is contained in:
krangelov
2021-09-07 15:54:27 +02:00
parent 8936e6211e
commit a843ddba55
11 changed files with 95 additions and 49 deletions

View File

@@ -42,7 +42,7 @@ modifyPGF :: PGF -> Transaction a -> IO PGF
modifyPGF p (Transaction f) =
withForeignPtr (a_db p) $ \c_db ->
withForeignPtr (revision p) $ \c_revision ->
withPgfExn "" $ \c_exn -> do
withPgfExn $ \c_exn -> do
c_revision <- pgf_clone_revision c_db c_revision c_exn
ex_type <- (#peek PgfExn, type) c_exn
if (ex_type :: (#type PgfExnType)) == (#const PGF_EXN_NONE)