|
|
Reflective Question
3
If a method passes an exception upwards
(that is, declares it as being thrown out of the method), then the method that called the
throwing method must itself catch the exception. If this method in its turn throws the
exception upwards, and all other methods do the same, eventually we will reach the
top of the calling chain, and there will be nowhere to throw the
exception. What will happen to the program then? Should the compiler allow the programmer
to define such a sequence of throws and, if so, what happens when the exception reaches
the top?
Discussion of Reflective Question 3

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg
|
|