Re: Handling multiple exceptions in one exception handler block
- From: "Luc The Perverse" <sll_noSpamlicious_z_XXX_m@xxxxxxxxxx>
- Date: Mon, 17 Jul 2006 03:41:00 -0600
"Ingo R. Homann" <ihomann_spam@xxxxxx> wrote in message
news:44bb54f5$0$26257$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
Adisht wrote:
Hi all,
I can anyone send me an example of how to catch 2 exceptions but handle
them together ?
Thanks,
Adi
Unfortunatly, (if the two exceptions do not have a supertype which the
other exceptions do not have) this is not possible. You can only extract
your code to a method:
You could say that having a supertype is the way to do this :) This would
of course suggest that you are the one generating and throwing the
exceptions.
--
LTP
for( Base i : allYourBase)
i.AreBelongToUs();
.
- References:
- Handling multiple exceptions in one exception handler block
- From: Adisht
- Re: Handling multiple exceptions in one exception handler block
- From: Ingo R. Homann
- Handling multiple exceptions in one exception handler block
- Prev by Date: Re: Handling multiple exceptions in one exception handler block
- Next by Date: Re: problem with TreeMap - element removal fails.
- Previous by thread: Re: Handling multiple exceptions in one exception handler block
- Next by thread: Re: Handling multiple exceptions in one exception handler block
- Index(es):
Relevant Pages
|