forked from External/mage
refactor: improved some error messages/tests
This commit is contained in:
parent
7f8526192f
commit
f0da749e0a
3 changed files with 11 additions and 7 deletions
|
|
@ -637,7 +637,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
public SpellAbility getSecondFaceSpellAbility() {
|
||||
Card secondFace = getSecondCardFace();
|
||||
if (secondFace == null || secondFace.getClass().equals(getClass())) {
|
||||
throw new IllegalArgumentException("Wrong code usage. getSecondFaceSpellAbility can only be used for double faced card (main side).");
|
||||
throw new IllegalArgumentException("Wrong code usage: getSecondFaceSpellAbility can only be used for double faced card (main side), broken card: " + this.getName());
|
||||
}
|
||||
return secondFace.getSpellAbility();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue