Lecture 20
12
Exceptions (client side)
•In client code (for example, Bank.java)
–try {
–    account.withdraw( amount ));
–}   
–catch ( InsufficientFundsException e ) {
–   // look at e, take appropriate action
–}
–// processing continues
•If all goes well, catch block code never executes
•If withdraw method in BankAccount has a problem it creates a new InsufficientFundsException object and throws it, to be caught here