Unparsable page-migration errors are logged at level ERROR
authorKai Moritz <kai@juplo.de>
Sat, 7 Nov 2015 14:44:04 +0000 (15:44 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 10 Nov 2015 14:51:19 +0000 (15:51 +0100)
src/main/java/de/juplo/facebook/exceptions/PageMigratedException.java

index dfa76cf..88917dc 100644 (file)
@@ -23,7 +23,11 @@ public class PageMigratedException extends OAuthException
     super(error);
     Matcher matcher = pattern.matcher(error.message);
     if (!matcher.find())
-      throw new RuntimeException("Could not parse migration-error: " + error.message);
+    {
+      String warning = "Could not parse migration-error: " + error.message;
+      LOG.error(warning);
+      throw new RuntimeException(warning);
+    }
     oldId = Long.parseLong(matcher.group(1));
     newId = Long.parseLong(matcher.group(2));
   }