handle corrupt files more gracefully

This commit is contained in:
jrandom
2004-05-09 04:14:30 +00:00
committed by zzz
parent 418531736b
commit 878525ced8

View File

@@ -33,6 +33,7 @@ class PeerSummaryReader {
PeerSummary summary = null;
String curDescription = null;
List curArgs = null;
try {
while ((line = reader.readLine()) != null) {
if (line.startsWith("peer\t")) {
String name = line.substring("peer\t".length()).trim();
@@ -83,7 +84,10 @@ class PeerSummaryReader {
}
}
}
} catch (Exception e) {
_log.error("Error handling the data", e);
throw new IOException("Error parsing the data");
}
if (summary == null)
return;
summary.coallesceData(monitor.getSummaryDurationHours() * 60*60*1000);