Author: jacopoc
Date: Tue Sep  6 07:15:21 2016
New Revision: 1759371

URL: http://svn.apache.org/viewvc?rev=1759371&view=rev
Log:
Improved error message logged by DelegatorFactoryImpl.getInstance(...) when a 
delegator can't be created; added a TODO comment to remind that the code should 
be refactored to throw the exception instead.

Modified:
    
ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java

Modified: 
ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java?rev=1759371&r1=1759370&r2=1759371&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java
 (original)
+++ 
ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java
 Tue Sep  6 07:15:21 2016
@@ -26,13 +26,14 @@ public class DelegatorFactoryImpl extend
 
     public static final String module = DelegatorFactoryImpl.class.getName();
 
+    // TODO: this method should propagate the GenericEntityException
     public Delegator getInstance(String delegatorName) {
         if (Debug.infoOn()) Debug.logInfo("Creating new delegator [" + 
delegatorName + "] (" + Thread.currentThread().getName() + ")", module);
         //Debug.logInfo(new Exception(), "Showing stack where new delegator is 
being created...", module);
         try {
             return new GenericDelegator(delegatorName);
         } catch (GenericEntityException e) {
-            Debug.logError(e, "Error creating delegator", module);
+            Debug.logError(e, "Error creating delegator: " + e.getMessage(), 
module);
             return null;
         }
     }


Reply via email to