mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
catch and record benign network play exception
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
This commit is contained in:
@@ -159,8 +159,14 @@ public enum ProtocolMethod {
|
|||||||
}
|
}
|
||||||
if (arg != null) {
|
if (arg != null) {
|
||||||
// attempt to Serialize each argument, this will throw an exception if it can't.
|
// attempt to Serialize each argument, this will throw an exception if it can't.
|
||||||
byte[] serialized = SerializationUtils.serialize((Serializable)arg);
|
try {
|
||||||
SerializationUtils.deserialize(serialized);
|
byte[] serialized = SerializationUtils.serialize((Serializable) arg);
|
||||||
|
SerializationUtils.deserialize(serialized);
|
||||||
|
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||||
|
// not sure why this one would be thrown, but it is
|
||||||
|
// it also doesn't prevent things from working, so, log for now, pending full network rewrite
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user