🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #194

Re: throwing exceptions

#194
From: S�ren Bak
Date: Sat, 19 Apr 2003 19:08
19 lines
2063 bytes
"Mike Crenshaw" <crenshaw@worldonline.dk> skrev i en meddelelse
news:Xxboa.22515$y3.1976088@news010.worldonline.dk...
> >     Cleaning up before giving up:
>
> > catch (CannotEnterPodException e) {
> >     hal.closePodBayDoors();
> >     throw e;
> > }
>
> hmm i still dont follow you.. you can execute the hal.closePodBayDoors()
> without the throw e anyway cant you?
>
>

You know that you should invoke hal.closePodBayDoors exactly because you
catch the exception. If you don't catch it, there is no-one who knows how to
clean up. But that is not the same as saying that the exception should not
be passed further on.
Technical Details
Message-ID: <Chgoa.90$gN6.74@news.get2net.dk>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.algonet.se!algonet!newsfeed1.uni2.dk!news.get2net.dk.POSTED!53ab2750!not-for-mail
References: <puIna.11699$hF.92186@news-server.bigpond.net.au> <qDIna.110$KS4.52@news.get2net.dk> <ryTna.20910$y3.1898552@news010.worldonline.dk> <3EA0185D.C7B1A753@sun.com> <Xxboa.22515$y3.1976088@news010.worldonline.dk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5d71,36528a6761383b70
X-Google-Attributes: gidf5d71,public
X-Google-Thread: 113ae9,36528a6761383b70
X-Google-Attributes: gid113ae9,public
X-Google-Thread: 10d6db,36528a6761383b70
X-Google-Attributes: gid10d6db,public
X-Google-ArrivalTime: 2003-04-19 11:09:39 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.algonet.se!algonet!newsfeed1.uni2.dk!news.get2net.dk.POSTED!53ab2750!not-for-mail
From: "S�ren Bak" <not@for.email>
Newsgroups: aus.computers.java,comp.lang.java,comp.lang.java.help
References: <puIna.11699$hF.92186@news-server.bigpond.net.au> <qDIna.110$KS4.52@news.get2net.dk> <ryTna.20910$y3.1898552@news010.worldonline.dk> <3EA0185D.C7B1A753@sun.com> <Xxboa.22515$y3.1976088@news010.worldonline.dk>
Subject: Re: throwing exceptions
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <Chgoa.90$gN6.74@news.get2net.dk>
Date: Sat, 19 Apr 2003 20:08:09 +0100
NNTP-Posting-Host: 195.82.219.57
X-Complaints-To: abuse@get2.net
X-Trace: news.get2net.dk 1050775778 195.82.219.57 (Sat, 19 Apr 2003 20:09:38 CEST)
NNTP-Posting-Date: Sat, 19 Apr 2003 20:09:38 CEST
Organization: get2net Internet Kunde