change common corrupt errors to warns

This commit is contained in:
zzz
2009-03-24 15:21:34 +00:00
parent d0a969ca33
commit e5f19c98a8
2 changed files with 10 additions and 10 deletions

View File

@ -393,8 +393,8 @@ public class FragmentHandler {
_log.error("Error receiving fragmented message (corrupt?): " + stringified, ioe);
} catch (I2NPMessageException ime) {
if (stringified == null) stringified = msg.toString();
if (_log.shouldLog(Log.ERROR))
_log.error("Error receiving fragmented message (corrupt?): " + stringified, ime);
if (_log.shouldLog(Log.WARN))
_log.warn("Error receiving fragmented message (corrupt?): " + stringified, ime);
}
}

View File

@ -78,13 +78,13 @@ public class FragmentedMessage {
return false;
}
if (length <= 0) {
if (_log.shouldLog(Log.ERROR))
_log.error("Length is impossible (" + length + ") for messageId " + messageId);
if (_log.shouldLog(Log.WARN))
_log.warn("Length is impossible (" + length + ") for messageId " + messageId);
return false;
}
if (offset + length > payload.length) {
if (_log.shouldLog(Log.ERROR))
_log.error("Length is impossible (" + length + "/" + offset + " out of " + payload.length + ") for messageId " + messageId);
if (_log.shouldLog(Log.WARN))
_log.warn("Length is impossible (" + length + "/" + offset + " out of " + payload.length + ") for messageId " + messageId);
return false;
}
if (_log.shouldLog(Log.DEBUG))
@ -131,13 +131,13 @@ public class FragmentedMessage {
return false;
}
if (length <= 0) {
if (_log.shouldLog(Log.ERROR))
_log.error("Length is impossible (" + length + ") for messageId " + messageId);
if (_log.shouldLog(Log.WARN))
_log.warn("Length is impossible (" + length + ") for messageId " + messageId);
return false;
}
if (offset + length > payload.length) {
if (_log.shouldLog(Log.ERROR))
_log.error("Length is impossible (" + length + "/" + offset + " out of " + payload.length + ") for messageId " + messageId);
if (_log.shouldLog(Log.WARN))
_log.warn("Length is impossible (" + length + "/" + offset + " out of " + payload.length + ") for messageId " + messageId);
return false;
}
if (_log.shouldLog(Log.DEBUG))