bodar / lazyrecords

Think LINQ for Java
8 stars 4 forks source link

BatchUpdateExceptions are meaningless #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When you have a java.sqlBatchUpdateExceception the exception is meaningless 
looks like this:

Received error java.sql.BatchUpdateException: Batch entry 0 insert into orders 
(id,order_id,seek_liqcom.googlecode.totallylazy.LazyException: 
java.sql.BatchUpdateException: Batch entry 0 ... some sql .... call 
getNextException() to find out more

Would be great to get that exception.

Enclosed is a patch todo just that

Original issue reported on code.google.com by tomjmal...@gmail.com on 3 Mar 2015 at 4:51

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in revision 

https://code.google.com/p/lazyrecords/source/detail?r=5cf83f93121ff69eaca27b55dd
31db0cbf6a9d78

Ending up doing it slightly differently so it logs all SqlExceptios by 
iterating through the chain. Please check that you are happy with multiple 
messages.

Original comment by daniel.bodart@gmail.com on 12 Mar 2015 at 1:33

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 6507a00c6f73.

Original comment by daniel.bodart@gmail.com on 12 Mar 2015 at 2:35