Catch some exceptions can occured here

This commit is contained in:
Xephi 2014-09-21 04:14:48 +02:00
parent 78cecb27d7
commit c88b2be3a3

View File

@ -106,7 +106,9 @@ public class FileCache {
while (attributes.values().iterator().hasNext()) {
Attribute a = attributes.values().iterator().next();
if (a != null) {
writer.write("attribute=" + a.getName() + ";" + a.getAttributeType().getMinecraftId() + ";" + a.getAmount() + ";" + a.getOperation().getId() + ";" + a.getUUID().toString());
try {
writer.write("attribute=" + a.getName() + ";" + a.getAttributeType().getMinecraftId() + ";" + a.getAmount() + ";" + a.getOperation().getId() + ";" + a.getUUID().toString());
} catch (Exception e) {}
}
}
} else {
@ -155,7 +157,9 @@ public class FileCache {
while (attributes.values().iterator().hasNext()) {
Attribute a = attributes.values().iterator().next();
if (a != null) {
writer.write("attribute=" + a.getName() + ";" + a.getAttributeType().getMinecraftId() + ";" + a.getAmount() + ";" + a.getOperation().getId() + ";" + a.getUUID().toString());
try {
writer.write("attribute=" + a.getName() + ";" + a.getAttributeType().getMinecraftId() + ";" + a.getAmount() + ";" + a.getOperation().getId() + ";" + a.getUUID().toString());
} catch (Exception e) {}
}
}
} else {