premchand Singh wrote:Guys try to understand the question ...my intention is not going in depth..
just i wana to know how to handle it..
Like for some error we can write in try catch block if we are pretty sure to error occur...
And you've already been given the answer by experts (which is presumably why you came here to ask in the first place).
DON'T - because whatever code you write to do so is likely to be redundant.
...so what are the other suitable method to handle them.
None. Let the program fail.
The only possible exception I can think of might be to enclose your entire app in a
try...catch block in its
main() method for logging purposes, perhaps something like:
but whatever you do, don't "swallow" the Error.
Winston