Improved: New documentation for EntitySync
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
@@ -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);
