From: Reimar Döffinger Date: Thu, 13 Apr 2017 20:51:45 +0000 (+0200) Subject: Clearer error message if newline could not be found. X-Git-Url: http://gitweb.fperrin.net/?p=DictionaryPC.git;a=commitdiff_plain;h=ccf16ba7c00f698fe09afdbcbfe51adb26b79b2e Clearer error message if newline could not be found. --- diff --git a/src/com/hughes/android/dictionary/parser/WikiTokenizer.java b/src/com/hughes/android/dictionary/parser/WikiTokenizer.java index a7863c7..7212319 100644 --- a/src/com/hughes/android/dictionary/parser/WikiTokenizer.java +++ b/src/com/hughes/android/dictionary/parser/WikiTokenizer.java @@ -579,7 +579,7 @@ public final class WikiTokenizer { // We were looking for the end, we got it. return end; } - errors.add("Couldn't find: " + toFind + ", "+ wikiText.substring(start)); + errors.add("Couldn't find: " + (toFind.equals("\n") ? "newline" : toFind) + ", "+ wikiText.substring(start)); if (firstNewline != -1) { return firstNewline; }