From 4388ca6289fcfa5e14dc50aa33ef950de4c1f33a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 24 Oct 2013 23:05:09 +0200 Subject: [PATCH] Throw exception when a post misses something vital. --- src/main/java/net/pterodactylus/sone/core/SoneParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.7.4