From: David ‘Bombe’ Roden Date: Thu, 24 Oct 2013 21:05:09 +0000 (+0200) Subject: Throw exception when a post misses something vital. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=4388ca6289fcfa5e14dc50aa33ef950de4c1f33a;p=Sone.git Throw exception when a post misses something vital. --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneParser.java b/src/main/java/net/pterodactylus/sone/core/SoneParser.java index 7dc0744..210fe32 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneParser.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneParser.java @@ -173,7 +173,7 @@ public class SoneParser { if ((postId == null) || (postTime == null) || (postText == null)) { /* TODO - mark Sone as bad. */ logger.log(Level.WARNING, String.format("Downloaded post for Sone %s with missing data! ID: %s, Time: %s, Text: %s", sone, postId, postTime, postText)); - return null; + throw new MalformedXml(); } try { PostBuilder postBuilder = sone.newPostBuilder();