CLOUDSTACK-4281 : Usage - exception was hiding the db error. Make the usage job fail incase of any DB insert exceptions

This commit is contained in:
Kishan Kavala 2013-08-13 17:24:27 +05:30
parent b172eb21c4
commit b4464d88d3
2 changed files with 3 additions and 10 deletions

View File

@ -129,11 +129,8 @@ public static final Logger s_logger = Logger.getLogger(NetworkUsageParser.class.
}
}
}
try {
m_usageDao.saveUsageRecords(usageRecords);
} catch (Exception ex) {
s_logger.error("Exception in usage manager", ex);
}
m_usageDao.saveUsageRecords(usageRecords);
return true;
}

View File

@ -157,11 +157,7 @@ public static final Logger s_logger = Logger.getLogger(VmDiskUsageParser.class.g
}
}
try {
m_usageDao.saveUsageRecords(usageRecords);
} catch (Exception ex) {
s_logger.error("Exception in usage manager", ex);
}
m_usageDao.saveUsageRecords(usageRecords);
return true;
}