You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/29 05:54:52 UTC

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

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);
             }