summaryrefslogtreecommitdiff
path: root/src/io
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-05-10 11:08:23 +0200
committerPeter Wu <peter@lekensteyn.nl>2014-05-10 11:08:23 +0200
commit8565b77c20b8b238bbe7f7fd4916ef1de50fe16c (patch)
treef9a8f65bcc558e9714166050bcb5318cefa6be06 /src/io
parent670fc2a89d65d9855d50a62f87c1cc061b280215 (diff)
downloadDatafiller-8565b77c20b8b238bbe7f7fd4916ef1de50fe16c.tar.gz
Check for errors if a validation error occurred
This gives more helpful messages when the primitive does not match (object or array instead of string).
Diffstat (limited to 'src/io')
-rw-r--r--src/io/TweetReader.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/io/TweetReader.java b/src/io/TweetReader.java
index f67daf8..8968b84 100644
--- a/src/io/TweetReader.java
+++ b/src/io/TweetReader.java
@@ -2,9 +2,7 @@ package io;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import com.google.gson.JsonParseException;
import com.google.gson.JsonSyntaxException;
-import data.DebuggingJsonDeserializer;
import data.Tweet;
import data.ValidatingJsonDeserializer;
import java.io.BufferedReader;
@@ -58,12 +56,7 @@ public class TweetReader implements ITweetReader {
}
private void debugTweet(String line, JsonSyntaxException ex) {
- try {
- System.err.println("Faulty line: " + line);
- DebuggingJsonDeserializer.tryValidate(line, Tweet.class);
- System.err.println("No error occured, how strange?");
- } catch (JsonParseException jse) {
- System.err.println("The error was: " + jse);
- }
+ System.err.println("Faulty line: " + line);
+ ex.printStackTrace();
}
}