Huh? test/Stock.java

Michael Thomas mike at mtcc.com
Sun Jul 6 10:03:21 PDT 1997


Mark Huizer writes:
 > Here it generates an error that it never reaches the second cache
 > statement (Stock.java:27: catch not reached.)
 > 
 > Isn't it supposed to be able to reach it? Or am I so wrong in my
 > understanding that one has to check for all exceptions in one catch and
 > try to find out what it is in other ways?

   The compiler is correct here, I think.
MalformedURLException is a subclass of
IOException. Since it executes catch's in
order and IOException is a valid Exception
it will execute it leaving the URLException
orphaned.
-- 
Michael Thomas	(mike at mtcc.com http://www.mtcc.com/~mike/)
        "I dunno, that's an awful lot of money."
			Beavis



More information about the kaffe mailing list