org.starhope.appius.except
Class NonSufficientFundsException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.starhope.appius.except.NonSufficientFundsException
All Implemented Interfaces:
Serializable

public class NonSufficientFundsException
extends Exception

This exception may be thrown for a purchase attempt by a player who does not have enough (in-game) currency to afford the item being purchased.

This has nothing to do with actual real-world money.

Author:
brpocock@star-hope.org
See Also:
Serialized Form

Field Summary
private  BigDecimal lack
          the amount of money lacking
private static long serialVersionUID
          Java serialisation unique ID
 
Constructor Summary
NonSufficientFundsException(BigDecimal difference)
           
 
Method Summary
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Java serialisation unique ID

See Also:
Constant Field Values

lack

private final BigDecimal lack
the amount of money lacking

Constructor Detail

NonSufficientFundsException

public NonSufficientFundsException(BigDecimal difference)
Parameters:
difference - how much more currency is needed to make the transaction work
Method Detail

toString

public String toString()
Overrides:
toString in class Throwable
See Also:
Throwable.toString()