/* * InsufficientFundsNonCreditException.java * Created on April 27, 2003, 3:03 PM */ package ezpassassign; /** * * @author mike */ public class InsufficientFundsNonCreditException extends java.lang.Exception { private double amount = 0; // amount attempting to debit when failed EzPassCustomer custTakingFrom; // Account that was short /** * Creates a new instance of InsufficientFundsNonCreditException without detail message. */ public InsufficientFundsNonCreditException() { } /** * Constructs an instance of InsufficientFundsNonCreditException with the specified detail message. * @param msg the detail message. */ public InsufficientFundsNonCreditException(String msg) { super(msg); } /** * Constructs an instance of InsufficientFundsNonCreditException with the specified detail message * and the amount of the debit that caused the problem. * @param msg the detail message. */ public InsufficientFundsNonCreditException(String msg, double amt) { super(msg); amount = amt; } /** * Constructs an instance of InsufficientFundsNonCreditException with the specified detail message * and the amount of the debit that caused the problem, and the customer with the problem * @param msg the detail message. */ public InsufficientFundsNonCreditException(String msg, EzPassCustomer toTakeFrom, double amt) { super(msg); amount = amt; custTakingFrom = toTakeFrom; } /** * To obtain the amount that caused the problem */ public double getAmount () { return amount; } /** * To obtain the account that didn't have enough money */ public EzPassCustomer getCustTakingFrom () { return custTakingFrom; } }