Package makingtransactions
Class NegativeBalanceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
makingtransactions.NegativeBalanceException
- All Implemented Interfaces:
Serializable
A custom exception for cases where credit on a transaction is bigger than the
balance on a bank account.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNegativeBalanceException
(double credit, double balance) Throw the NegativeBalanceException, to avoid a negative balance on a bank account. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
NegativeBalanceException
public NegativeBalanceException(double credit, double balance) Throw the NegativeBalanceException, to avoid a negative balance on a bank account.- Parameters:
credit
- The credit of the transaction.balance
- The balance on the bank account.
-
-
Method Details