File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Throwable and error

 
jai gurudev
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

can we catch Throwable and Error in Catch Block like

Catch(Throwable e) and Catch(Error e)

give some examples


regards

jaigurudev
 
Petr Blahos
Ranch Hand
Posts: 131
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jai,

Why don't you try it yourself? You know what an Error or a
Throwable is, you probably know how to use exceptions, so
why don't you just put a few of lines together, run javac,
then java, and see?!?

I mean, that's the way how you can learn the most.

P.
 
Kj Reddy
Ranch Hand
Posts: 1704
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Mr. Petr Thats true. You can learn more things by trying your own.

You can catch everything which are all subclasses of Throwable including Throwable. So Mr Jai why dont you test my statement and tell me whether i right or wrong?

Regards
Jagdish
 
Vijayendra V Rao
Ranch Hand
Posts: 195
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jai gurudev:

give some examples


Write your own examples and test them. The best way to learn is
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic