my dog learned polymorphism*
The moose likes Beginning Java and the fly likes catch (Exception parameter) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "catch (Exception parameter)" Watch "catch (Exception parameter)" New topic
Author

catch (Exception parameter)

frantisek nejedly
Ranch Hand

Joined: Sep 09, 2008
Posts: 42
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

The best would be to read at least some basics on exceptions, like this


[My Blog]
All roads lead to JavaRanch
frantisek nejedly
Ranch Hand

Joined: Sep 09, 2008
Posts: 42
I've read that before posting the question. I'm going there once again. Thank you.
frantisek nejedly
Ranch Hand

Joined: Sep 09, 2008
Posts: 42
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

Joined: Sep 09, 2008
Posts: 42

[ October 10, 2008: Message edited by: frantisek nejedly ]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37970
    
  22
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

Joined: Sep 09, 2008
Posts: 42
I see, thank you.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37970
    
  22

You're welcome.
 
jQuery in Action, 2nd edition
 
subject: catch (Exception parameter)
 
Similar Threads
Does getParameterValues have a Limit
Thank you Ulf Dittmer
Servet parameters not receiving prolbem
Need Help
create session object from ConnectionFactory