svn commit: r1343467 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1343467 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java

doogie-3
Author: doogie
Date: Tue May 29 03:54:51 2012
New Revision: 1343467

URL: http://svn.apache.org/viewvc?rev=1343467&view=rev
Log:
FEATURE: Change NoTransaction.call() to throw GenericEntityException
instead of Exception.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java?rev=1343467&r1=1343466&r2=1343467&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java Tue May 29 03:54:51 2012
@@ -973,10 +973,18 @@ public class TransactionUtil implements
             this.callable = callable;
         }
 
-        public V call() throws Exception {
+        public V call() throws GenericEntityException {
             Transaction suspended = TransactionUtil.suspend();
             try {
                 return callable.call();
+            } catch (Error e) {
+                throw e;
+            } catch (RuntimeException e) {
+                throw e;
+            } catch (GenericEntityException e) {
+                throw e;
+            } catch (Exception e) {
+                throw new GenericEntityException(e);
             } finally {
                 TransactionUtil.resume(suspended);
             }