]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/utils/Globals.java
parseLedgerDate: more info on parse error
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / utils / Globals.java
index 4562dbaec3f106ef5008283a74bee645785b5967..8f010cbee7435c12411ed787600496b8baef625c 100644 (file)
@@ -53,7 +53,9 @@ public final class Globals {
     }
     public static Date parseLedgerDate(String dateString) throws ParseException {
         Matcher m = reLedgerDate.matcher(dateString);
-        if (!m.matches()) throw new ParseException(dateString, 0);
+        if (!m.matches()) throw new ParseException(
+                String.format("'%s' does not match expected pattern '%s'", dateString,
+                        reLedgerDate.toString()), 0);
 
         String year = m.group(1);
         String month = m.group(2);