| Author |
About Try-Catch
|
kayanaat sidiqui
Ranch Hand
Joined: Sep 04, 2008
Posts: 122
|
|
Hi there, Well i just want to know that, is there any limit to the number of "catch" block associated with a try block?
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
|
Not that I'm aware of. But if your code starts getting unmanageable, you might want to rethink your approach.
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
kayanaat sidiqui
Ranch Hand
Joined: Sep 04, 2008
Posts: 122
|
|
|
Thanks weber, but i want the answer in exact figure, if any. Approach is different thing while limit is something else, And i want that limit over the number of catch block if it is there by sun team while developing jdk1.5.
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
Sounds like some exceptional code you're contemplating. I don't know the answer, but I suspect the Zero One Infinity (ZOI) rule might apply here. [ October 11, 2008: Message edited by: marc weber ]
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32651
|
|
|
Have you been through the Java Language Specification and the Virtual Machine Specification? You will find Marc is correct if you go through them.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
The only limit is probably the size limit of both source file and class file.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
kayanaat sidiqui
Ranch Hand
Joined: Sep 04, 2008
Posts: 122
|
|
|
Thank you Marc, Campbell and Rob.
|
 |
kayanaat sidiqui
Ranch Hand
Joined: Sep 04, 2008
Posts: 122
|
|
|
And Rob, i have a humble request for you, please make some space in your private message box because i tried to send you a private message but it couldn't be delivered. Thank you.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
I cleaned up most of the name warning PM's I should have enough space for a while now.
|
 |
 |
|
|
subject: About Try-Catch
|
|
|