Commented out throws in the BinaryMessageDecoder for messages we ignore as they were not errors and instead were causing the program to stop if they're received

- commented out throw from default, chatter text, yachactioncode, yachteventcode, displaytextmessage states
#story[881]
This commit is contained in:
Fan-Wu Yang
2017-05-14 16:13:37 +12:00
parent b2d9e44d03
commit 294627074d
2 changed files with 14 additions and 7 deletions
@@ -148,7 +148,7 @@ public class BinaryMessageDecoder {
case DISPLAYTEXTMESSAGE:
//System.out.println("Display Text Message");
//No decoder for this.
throw new InvalidMessageException("Cannot decode DISPLAYTEXTMESSAGE - no decoder.");
//throw new InvalidMessageException("Cannot decode DISPLAYTEXTMESSAGE - no decoder.");
case XMLMESSAGE:
//System.out.println("XML Message!");
@@ -164,17 +164,17 @@ public class BinaryMessageDecoder {
case YACHTEVENTCODE:
//System.out.println("Yacht Action Code!");
//No decoder for this.
throw new InvalidMessageException("Cannot decode YACHTEVENTCODE - no decoder.");
//throw new InvalidMessageException("Cannot decode YACHTEVENTCODE - no decoder.");
case YACHTACTIONCODE:
//System.out.println("Yacht Action Code!");
//No decoder for this.
throw new InvalidMessageException("Cannot decode YACHTACTIONCODE - no decoder.");
//throw new InvalidMessageException("Cannot decode YACHTACTIONCODE - no decoder.");
case CHATTERTEXT:
//System.out.println("Chatter Text Message!");
//No decoder for this.
throw new InvalidMessageException("Cannot decode CHATTERTEXT - no decoder.");
//throw new InvalidMessageException("Cannot decode CHATTERTEXT - no decoder.");
case BOATLOCATION:
//System.out.println("Boat Location Message!");
@@ -198,10 +198,10 @@ public class BinaryMessageDecoder {
default:
//System.out.println("Broken Message!");
throw new InvalidMessageException("Broken message! Did not recognise message type: " + headerMessageType + ".");
//throw new InvalidMessageException("Broken message! Did not recognise message type: " + headerMessageType + ".");
return null;
}
}