• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

catch (Exception parameter)

 
frantisek nejedly
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
it's not clear to me what the parameter is and how to use it.
Could you tell me please?
Thank you.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best would be to read at least some basics on exceptions, like this
 
frantisek nejedly
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've read that before posting the question. I'm going there once again. Thank you.
 
frantisek nejedly
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The parameter is a name of reference variable which refers to the object of type Exception created when the Exception is thrown.

Am I right?
 
frantisek nejedly
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ October 10, 2008: Message edited by: frantisek nejedly ]
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The parameter is a reference to a type of Exception which you expect to catch. This usually applies to checked Exceptions where you know what sort of Exception to expect.
 
frantisek nejedly
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, thank you.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You're welcome.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic