Huh? test/Stock.java
Zenin
zenin at best.com
Mon Jul 7 07:33:00 PDT 1997
TAKE ME OFF THIS MAILING LIST NOW!!!!
> From kaffe-approval at soi.city.ac.uk Sun Jul 6 12:38:10 1997
> X-Authentication-Warning: vega.soi.city.ac.uk: lp set sender to owner-kaffe at soi.city.ac.uk using -f
> Date: Sun, 6 Jul 1997 16:08:46 +0100
> Message-Id: <199707061508.QAA00372 at cerise.sensei.co.uk>
> From: Glynn Clements <glynn at sensei.co.uk>
> To: xaa at stack.nl (Mark Huizer), kaffe at kaffe.org
> Subject: Re: Huh? test/Stock.java
> In-Reply-To: <19970706115327.24075 at xaa.stack.nl>
> References: <19970706115327.24075 at xaa.stack.nl>
> X-Mailer: VM 6.32 under 20.3 "Athens" XEmacs Lucid (beta10)
> Sender: owner-kaffe at soi.city.ac.uk
> Precedence: bulk
> Reply-To: kaffe at kaffe.org
>
> Mark Huizer wrote:
>
> > Just a small question. Just for fun I tried some of the tests, giving
> > errors quite some times, but some are strange.
> >
> > Take e.g. test/compiler/Stock.java...
> >
> > try {
> > url = new URL( "http://localhost/" );
> > System.out.println( "Hi\n" );
> > System.out.println( url.getContent().toString() );
> > System.out.println( "Bye\n" );
> > }
> > catch (java.io.IOException e) {
> > }
> > catch (java.net.MalformedURLException e) {
> >
> > 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?
>
> MalformedURLException is a subclass of IOException. If you want to
> catch instances of MalformedURLException separately, you need to
> reverse the order of the two catch statements.
>
> --
> Glynn Clements <glynn at sensei.co.uk>
>
>
More information about the kaffe
mailing list