Added an InvalidMessageTypeException - thrown whenever we encounter a MessageType that isn't recognised or isn't supported.
Added EncoderFactory. This creates specific MessageEncoders. Supports JoinAcceptance and RequestToJoin. Added MessageEncoder interface. Added JoinAcceptanceEncoder. Added encode(AC35Data) function to RaceVisionByteEncoder. Added RequestToJonEncoder. Updated RequestToJoin and JoinAcceptance decode/encode tests to use the above. issue #35 #36 #story[1095]
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package network.Exceptions;
|
||||
|
||||
|
||||
/**
|
||||
* An exception thrown when we encounter a message type that isn't recognised.
|
||||
*/
|
||||
public class InvalidMessageTypeException extends Exception {
|
||||
|
||||
|
||||
public InvalidMessageTypeException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public InvalidMessageTypeException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user