1 package de.juplo.facebook.exceptions;
4 import java.util.regex.Matcher;
5 import java.util.regex.Pattern;
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 public PageMigratedException(String message)
24 Matcher matcher = pattern.matcher(message);
26 throw new RuntimeException("Could not parse migration-error: " + message);
27 oldId = Long.parseLong(matcher.group(1));
28 newId = Long.parseLong(matcher.group(2));
32 public Long getOldId()
37 public Long getNewId()