mirror of https://github.com/apache/openjpa.git
OPENJPA-631 provide detailed SQLException for batched statements that encountered error in DB2
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@666137 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
110e3ff4b0
commit
ddc42e8078
|
@ -536,6 +536,14 @@ public class DB2Dictionary
|
||||||
else
|
else
|
||||||
exceptionMsg = exceptionMsg.concat( "]" );
|
exceptionMsg = exceptionMsg.concat( "]" );
|
||||||
msg = msg.concat(exceptionMsg);
|
msg = msg.concat(exceptionMsg);
|
||||||
|
|
||||||
|
// for batched execution failures, SQLExceptions are nested
|
||||||
|
SQLException sqle2 = sqle.getNextException();
|
||||||
|
while (sqle2 != null) {
|
||||||
|
msg = msg.concat("\n" + sqle2.getMessage());
|
||||||
|
sqle2 = sqle2.getNextException();
|
||||||
|
}
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
return sqle.getMessage();
|
return sqle.getMessage();
|
||||||
|
|
Loading…
Reference in New Issue