mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
Better logging?
This commit is contained in:
parent
ad0dde4501
commit
aa033617a2
2 changed files with 10 additions and 2 deletions
|
@ -110,7 +110,8 @@ public class AbilitiesImpl<T extends Ability> extends ArrayList<T> implements Ab
|
||||||
rules.add(Character.toUpperCase(rule.charAt(0)) + rule.substring(1));
|
rules.add(Character.toUpperCase(rule.charAt(0)) + rule.substring(1));
|
||||||
}
|
}
|
||||||
} else { // logging so we can still can be made aware of rule problems a card has
|
} else { // logging so we can still can be made aware of rule problems a card has
|
||||||
logger.fatal("Error in rule text generation of " + source + ": Create a bug report or fix the source code");
|
String cardName = ((SpellAbility) ability).getCardName();
|
||||||
|
logger.fatal("Error in rule text generation of " + cardName + ": Create a bug report or fix the source code");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ package mage.abilities.keyword;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.SpellAbility;
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
@ -142,7 +143,13 @@ public class AwakenAbility extends SpellAbility {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
logger.fatal("Source was null in AwakenAbility: Create a bug report or fix the source code");
|
logger.fatal("Source was null in AwakenAbility: Create a bug report or fix the source code");
|
||||||
} else if (source.getTargets() == null) {
|
} else if (source.getTargets() == null) {
|
||||||
logger.fatal("getTargets was null in AwakenAbility for " + source + " : Create a bug report or fix the source code");
|
MageObject sourceObj = source.getSourceObject(game);
|
||||||
|
if (sourceObj != null) {
|
||||||
|
Class<? extends MageObject> sourceClass = sourceObj.getClass();
|
||||||
|
if (sourceClass != null) {
|
||||||
|
logger.fatal("getTargets was null in AwakenAbility for " + sourceClass.toString() + " : Create a bug report or fix the source code");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue