• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About Try-Catch

 
kayanaat sidiqui
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not that I'm aware of. But if your code starts getting unmanageable, you might want to rethink your approach.
 
kayanaat sidiqui
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48382
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20494
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only limit is probably the size limit of both source file and class file.
 
kayanaat sidiqui
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Marc, Campbell and Rob.
 
kayanaat sidiqui
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20494
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cleaned up most of the name warning PM's
I should have enough space for a while now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic