Throw a different exception if a Sone is too new.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneParser.java
index a658ae1..98af5b6 100644 (file)
@@ -97,7 +97,7 @@ public class SoneParser {
                        }
                        if (protocolVersion.get() > MAX_PROTOCOL_VERSION) {
                                logger.log(Level.WARNING, String.format("Unknown protocol version: %d! Not parsing Sone.", protocolVersion.get()));
-                               throw new InvalidProtocolVersion();
+                               throw new SoneTooNew();
                        }
                }
 
@@ -338,6 +338,10 @@ public class SoneParser {
 
        }
 
+       public static class SoneTooNew extends RuntimeException {
+
+       }
+
        public static class MalformedXml extends RuntimeException {
 
        }