Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Commit

Permalink
In an exception case the ServiceUtils.setServiceFields method should …
Browse files Browse the repository at this point in the history
…throw an exception and don't hide it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447603 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Sascha Rodekamp committed Feb 19, 2013
1 parent e3ea07f commit 6a33792
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions framework/service/src/org/ofbiz/service/ServiceUtil.java
Expand Up @@ -468,7 +468,7 @@ public static Map<String, Object> purgeOldJobs(DispatchContext dctx, Map<String,
noMoreResults = true; noMoreResults = true;
} }
} }

// Now JobSandbox data is cleaned up. Now process Runtime data and remove the whole data in single shot that is of no need. // Now JobSandbox data is cleaned up. Now process Runtime data and remove the whole data in single shot that is of no need.
boolean beganTx3 = false; boolean beganTx3 = false;
GenericValue runtimeData = null; GenericValue runtimeData = null;
Expand All @@ -478,7 +478,7 @@ public static Map<String, Object> purgeOldJobs(DispatchContext dctx, Map<String,
try { try {
// begin this transaction // begin this transaction
beganTx3 = TransactionUtil.begin(); beganTx3 = TransactionUtil.begin();

runTimeDataIt = delegator.find("RuntimeData", null, null, UtilMisc.toSet("runtimeDataId"), null, null); runTimeDataIt = delegator.find("RuntimeData", null, null, UtilMisc.toSet("runtimeDataId"), null, null);
try { try {
while ((runtimeData = runTimeDataIt.next()) != null) { while ((runtimeData = runTimeDataIt.next()) != null) {
Expand Down Expand Up @@ -701,9 +701,10 @@ public static Map<String, Object> resetJob(DispatchContext dctx, Map<String, Obj
* @param timeZone * @param timeZone
* @param locale * @param locale
* @return filled Map or null on error * @return filled Map or null on error
* @throws GeneralServiceException
*/ */
public static Map<String, Object> setServiceFields(LocalDispatcher dispatcher, String serviceName, Map<String, Object> fromMap, GenericValue userLogin, public static Map<String, Object> setServiceFields(LocalDispatcher dispatcher, String serviceName, Map<String, Object> fromMap, GenericValue userLogin,
TimeZone timeZone, Locale locale) { TimeZone timeZone, Locale locale) throws GeneralServiceException {
Map<String, Object> outMap = FastMap.newInstance(); Map<String, Object> outMap = FastMap.newInstance();


ModelService modelService = null; ModelService modelService = null;
Expand All @@ -712,7 +713,7 @@ public static Map<String, Object> setServiceFields(LocalDispatcher dispatcher, S
} catch (GenericServiceException e) { } catch (GenericServiceException e) {
String errMsg = "Could not get service definition for service name [" + serviceName + "]: "; String errMsg = "Could not get service definition for service name [" + serviceName + "]: ";
Debug.logError(e, errMsg, module); Debug.logError(e, errMsg, module);
return null; throw new GeneralServiceException(e);
} }
outMap.putAll(modelService.makeValid(fromMap, "IN", true, null, timeZone, locale)); outMap.putAll(modelService.makeValid(fromMap, "IN", true, null, timeZone, locale));


Expand Down

0 comments on commit 6a33792

Please sign in to comment.