From 4cbedfc51870e90fbdc2d0935c3b485b97a76e72 Mon Sep 17 00:00:00 2001 From: Jacopo Cappellato Date: Tue, 6 Sep 2016 07:15:21 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759371 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java index 5be450d71e..e7102c8afa 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/DelegatorFactoryImpl.java @@ -26,13 +26,14 @@ public class DelegatorFactoryImpl extends DelegatorFactory { 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; } }