Author: ppoddar
Date: Mon Dec 10 12:13:20 2007
New Revision: 603031
URL: http://svn.apache.org/viewvc?rev=603031&view=rev
Log:
Shows the failed SQL Statement when things break rather than internal
ExpContext object
Modified:
openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java
Modified:
openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java?rev=603031&r1=603030&r2=603031&view=diff
==============================================================================
---
openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java
(original)
+++
openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java
Mon Dec 10 12:13:20 2007
@@ -501,13 +501,14 @@
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) {}
}