Added the read class ID to the bad deserialize

exception.  Two things can cause bad reads:
1) bad data in the stream... in which the extra info
   is useless or confusing.
2) unregistered classes or bad timing, either way,
   knowing the message type ID might be useful.
This commit is contained in:
Paul Speed 2015-05-02 00:39:41 -04:00
parent 58313c271d
commit c1670e7509

View File

@ -181,7 +181,7 @@ public class MessageProtocol
Message m = (Message)obj; Message m = (Message)obj;
messages.add(m); messages.add(m);
} catch( IOException e ) { } catch( IOException e ) {
throw new RuntimeException( "Error deserializing object", e ); throw new RuntimeException( "Error deserializing object, clas ID:" + buffer.getShort(0), e );
} }
} }
} }