Lecture 21
7
Exceptions and the stack
•
When error detected (BA.java line 143):
–
–
if (newBalance < 0)
throw new
InsufficientFundsException …
–
•
Normal flow control stops - JVM looks for
the nearest catch, which may be
–
in the running method
–
somewhere up the call stack