Author: jleroux
Date: Mon May 28 17:34:20 2018
New Revision: 1832411
URL: http://svn.apache.org/viewvc?rev=1832411&view=rev
Log:
Improved: New documentation for EntitySync
(OFBIZ-10390)
No functional changes while working on EntitySync-manual.adoc and checking the
opportunity of existing debug log (it's a bit verbose, but it's OK as is)
Simply uses a multi-catch where possible
Modified:
ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java
Modified:
ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java?rev=1832411&r1=1832410&r2=1832411&view=diff
==============================================================================
---
ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java
(original)
+++
ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java
Mon May 28 17:34:20 2018
@@ -653,19 +653,7 @@ public class EntitySyncContext {
GenericEntity pkToRemove = null;
try {
pkToRemove = (GenericEntity)
XmlSerializer.deserialize(primaryKeyRemoved, delegator);
- } catch (IOException e) {
- String errorMsg = "Error deserializing GenericPK to remove
in Entity Sync Data for entitySyncId [" + entitySyncId + "] and
entitySyncRemoveId [" + entitySyncRemove.getString("entitySyncRemoveId") + "]:
" + e.toString();
- Debug.logError(e, errorMsg, module);
- throw new SyncDataErrorException(errorMsg, e);
- } catch (SAXException e) {
- String errorMsg = "Error deserializing GenericPK to remove
in Entity Sync Data for entitySyncId [" + entitySyncId + "] and
entitySyncRemoveId [" + entitySyncRemove.getString("entitySyncRemoveId") + "]:
" + e.toString();
- Debug.logError(e, errorMsg, module);
- throw new SyncDataErrorException(errorMsg, e);
- } catch (ParserConfigurationException e) {
- String errorMsg = "Error deserializing GenericPK to remove
in Entity Sync Data for entitySyncId [" + entitySyncId + "] and
entitySyncRemoveId [" + entitySyncRemove.getString("entitySyncRemoveId") + "]:
" + e.toString();
- Debug.logError(e, errorMsg, module);
- throw new SyncDataErrorException(errorMsg, e);
- } catch (SerializeException e) {
+ } catch (IOException | SAXException |
ParserConfigurationException | SerializeException e) {
String errorMsg = "Error deserializing GenericPK to remove
in Entity Sync Data for entitySyncId [" + entitySyncId + "] and
entitySyncRemoveId [" + entitySyncRemove.getString("entitySyncRemoveId") + "]:
" + e.toString();
Debug.logError(e, errorMsg, module);
throw new SyncDataErrorException(errorMsg, e);
@@ -865,7 +853,7 @@ public class EntitySyncContext {
}
}
- if (Debug.infoOn()) Debug.logInfo("Finished saveFinalSyncResults [" +
entitySyncId + "]: totalRows=" + totalRows + ", totalRowsToCreate=" +
totalRowsToCreate + ", totalRowsToStore=" + totalRowsToStore + ",
totalRowsToRemove=" + totalRowsToRemove, module);
+ if (Debug.infoOn()) Debug.logInfo("Finished save Final Sync Results ["
+ entitySyncId + "]: totalRows=" + totalRows + ", totalRowsToCreate=" +
totalRowsToCreate + ", totalRowsToStore=" + totalRowsToStore + ",
totalRowsToRemove=" + totalRowsToRemove, module);
}
public Set<String> makeEntityNameToUseSet() {