Exception
posted 18 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi Folks
What is the main difference between Exception and Error?

What is the main difference between Exception and Error?

posted 18 years ago
If you catch the Throwable, Error or Exception you need not to throw them
in the try block.
If you catch subclasses of Exception or Throwable, you must throw it in the try block!
Regards,
cmbhatt
[ April 15, 2007: Message edited by: Chandra Bhatt ]
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
If you catch the Throwable, Error or Exception you need not to throw them
in the try block.
If you catch subclasses of Exception or Throwable, you must throw it in the try block!
Regards,
cmbhatt
[ April 15, 2007: Message edited by: Chandra Bhatt ]
cmbhatt
Gaurav Pavan Kumar Jain
Ranch Hand
Posts: 168
posted 18 years ago
Hi Bhatt,
Dont you think this is misleading cause exceptions dont extend from errors & neither do errors extend from exceptions. They both extend from throwable alright but they are actually 2 different branches.
It appears from your diagram that exceptions extend from errors.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Originally posted by Chandra Bhatt:
[QB]Throwable (Daddy of all exceptions)
^
|
|
Error
^
|
|
Exception
Hi Bhatt,
Dont you think this is misleading cause exceptions dont extend from errors & neither do errors extend from exceptions. They both extend from throwable alright but they are actually 2 different branches.
It appears from your diagram that exceptions extend from errors.
Regards,<br />Sourin.
posted 18 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
yeahh... Sourin is correct...
[ April 11, 2007: Message edited by: Milan Jagatiya ]
[ April 11, 2007: Message edited by: Milan Jagatiya ]
posted 18 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
ASCII silly question, Get a silly ANSI.
Chandra Bhatt
Ranch Hand
Posts: 1710
posted 18 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Extremely sorry to you all,
Actually I didn't see what exactly went from my clipboard to my post.
You know, less caffeine a day causes this sort of mistakes.
My explanation is correct, I assure. Isn't it?
Thanks for pointing out the blunder!
Regards,
cmbhatt
[ April 11, 2007: Message edited by: Chandra Bhatt ]
Actually I didn't see what exactly went from my clipboard to my post.
You know, less caffeine a day causes this sort of mistakes.
My explanation is correct, I assure. Isn't it?
Thanks for pointing out the blunder!
Regards,
cmbhatt
[ April 11, 2007: Message edited by: Chandra Bhatt ]
cmbhatt
| Nothing? Or something? Like this tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |







