Shows the failed SQL Statement when things break rather than internal ExpContext object

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@603031 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2007-12-10 20:13:20 +00:00
parent 38f41d870e
commit 111098f1b3
1 changed files with 3 additions and 2 deletions

View File

@ -501,13 +501,14 @@ public class JDBCStoreQuery
try {
stmnt = sql[i].prepareStatement(conn);
count += stmnt.executeUpdate();
} catch (SQLException se) {
throw SQLExceptions.getStore(se, sql[i].getSQL(),
_store.getDBDictionary());
} finally {
if (stmnt != null)
try { stmnt.close(); } catch (SQLException se) {}
}
}
} catch (SQLException se) {
throw SQLExceptions.getStore(se, ctx, _store.getDBDictionary());
} finally {
try { conn.close(); } catch (SQLException se) {}
}