Designing RMI Applications
OverdraftException and
NegativeAmountException.OverdraftException can also tell if the
withdrawal succeeded.
public class OverdraftException extends Exception { public boolean withdrawalSucceeded; public OverdraftException(boolean withrawalSucceeded){ this.withrawalSucceeded = withrawalSucceeded; } public boolean didWithdrawalSucceed(){ return withrawalSucceeded; } }
20 of 49