Debug build for #352

This commit is contained in:
HappyPikachu 2016-06-23 21:34:35 -04:00
parent 0d207e8321
commit 0995d23a3d

View File

@ -1207,7 +1207,8 @@ public class Quester {
public void reachLocation(Quest quest, Location l) {
for (Location location : getQuestData(quest).locationsReached) {
//debug try/catch for #352
try {
int index = getQuestData(quest).locationsReached.indexOf(location);
Location locationToReach = getCurrentStage(quest).locationsToReach.get(index);
double radius = getQuestData(quest).radiiToReachWithin.get(index);
@ -1229,6 +1230,12 @@ public class Quester {
}
}
} catch (IndexOutOfBoundsException e) {
System.out.println("An error has occurred with Quests. Please report on Github. Include the info below");
System.out.println("index = " + getQuestData(quest).locationsReached.indexOf(location));
System.out.println("locationsReached = " + getQuestData(quest).locationsReached.toString());
e.printStackTrace();
}
}