| Author |
I Wonder How To Catch This Exception ?
|
Ranjith Suranga
Ranch Hand
Joined: Oct 28, 2012
Posts: 84
|
|
Hi, I have got this code in my class. I have tried to catch the exception here, but i am still not able to do it so.. Could you please help me... ?
These are the methods which I have tried to catch the exception.. Non of them work in this case.. I don't know why... ?
Thank You.
|
 |
Ranjith Suranga
Ranch Hand
Joined: Oct 28, 2012
Posts: 84
|
|
|
Hey, Isn't this exception ? Is this an error... ?
|
 |
Ranjith Suranga
Ranch Hand
Joined: Oct 28, 2012
Posts: 84
|
|
OK. I tried this and it works.. It is not an exception, It is an error, I think...
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32833
|
|
Never catch Errors (unless you are simply seeing what happens if…).
I would rather say, “What Exception?” I can’t see anything which produces a bona fide Exception in your code.
You are recursively calling a method with no base case, so your recursion will go on for ever (or more precisely until you exhaust the available stack memory), but that is a different design mistake.
|
 |
 |
|
|
subject: I Wonder How To Catch This Exception ?
|
|
|