1 package de.juplo.facebook.exceptions;
4 import java.util.regex.Matcher;
5 import java.util.regex.Pattern;
10 * 21: Page ID (XXX) was migrated to page ID (YYY).
13 public class PageMigratedException extends OAuthException
15 private final static Pattern pattern =
16 Pattern.compile("Page ID ([0-9]+) was migrated to page ID ([0-9]+)");
18 private final Long oldId, newId;
21 protected PageMigratedException(FacebookErrorMessage error)
24 Matcher matcher = pattern.matcher(error.message);
26 throw new RuntimeException("Could not parse migration-error: " + error.message);
27 oldId = Long.parseLong(matcher.group(1));
28 newId = Long.parseLong(matcher.group(2));
32 public Long getOldId()
37 public Long getNewId()