From 1a6f237258eea5839d46dc461e4a3233b8f9e02f Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Thu, 29 Oct 2015 11:01:42 +0100 Subject: [PATCH] Just catch everything that could go wrong --- .../java/de/danoeh/antennapod/core/util/DateUtils.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/DateUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/DateUtils.java index c0233f684..1a148673c 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/DateUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/DateUtils.java @@ -88,9 +88,13 @@ public class DateUtils { for(String pattern : patterns) { parser.applyPattern(pattern); pos.setIndex(0); - Date result = parser.parse(date, pos); - if(result != null && pos.getIndex() == date.length()) { - return result; + try { + Date result = parser.parse(date, pos); + if (result != null && pos.getIndex() == date.length()) { + return result; + } + } catch(Exception e) { + Log.e(TAG, Log.getStackTraceString(e)); } }