Conversation: replace RuntimeExceptions with AssertionErrors to properly communicate...
[pingpong.git] / Code / Projects / SmartPlugDetector / src / main / java / edu / uci / iotproject / Conversation.java
index 05d97e3924b45afa55e198361300e26bbfa287a1..b8681f53748345815d923fdaa1afb7e0470054c3 100644 (file)
@@ -370,7 +370,7 @@ public class Conversation {
             case SERVER_TO_CLIENT:
                 return mSeqNumbersSrv.contains(seqNo);
             default:
-                throw new RuntimeException(String.format("Unexpected value of enum '%s'",
+                throw new AssertionError(String.format("Unexpected value of enum '%s'",
                         Direction.class.getSimpleName()));
         }
     }
@@ -399,7 +399,7 @@ public class Conversation {
                 mSeqNumbersSrv.add(seqNo);
                 break;
             default:
-                throw new RuntimeException(String.format("Unexpected value of enum '%s'",
+                throw new AssertionError(String.format("Unexpected value of enum '%s'",
                         Direction.class.getSimpleName()));
         }
     }