Add missing error logs to OperationManagerImpl

corrective-policy^2
Pahansith Gunathilake 4 years ago committed by Dharmakeerthi Lasantha
parent d4dde59fc5
commit caba7fc673

@ -733,7 +733,10 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
constructCollectionType(List.class, EventAction.class));
eventData.setActions(eventActions);
} catch (IOException e) {
log.error("Error occurred while parsing event actions of the event with ID " + event.getEventId());
if (log.isDebugEnabled()) {
log.warn("Error occurred while parsing event actions of the event with ID " + event.getEventId());
}
continue;
}
eventList.add(eventData);
}

@ -250,9 +250,13 @@ public class OperationManagerImpl implements OperationManager {
return activity;
} catch (OperationManagementDAOException e) {
OperationManagementDAOFactory.rollbackTransaction();
throw new OperationManagementException("Error occurred while adding operation", e);
String msg = "Error occurred while adding operation";
log.error(msg, e);
throw new OperationManagementException(msg, e);
} catch (TransactionManagementException e) {
throw new OperationManagementException("Error occurred while initiating the transaction", e);
String msg = "Error occurred while initiating the transaction";
log.error(msg, e);
throw new OperationManagementException(msg, e);
} finally {
OperationManagementDAOFactory.closeConnection();
}

Loading…
Cancel
Save