Java makes programmer's life simple. Let me define life in Java in a simple way.
try { life;}
catch (problem1 e1){...}
catch (problem2 e2){...}
...
finally{die;}
If you can catch all exceptions, you are a good programmer.
There is a catch. Catch is, you can not catch all exceptions in life.
Life is an unhandled exception so you can not have a common exception handler block...
catch (java.lang.Exception e){...}
If you put too many exception handler blocks, code will become complicated. So will be life.
If you put few exception handler blocks, code will be unreliable. so will be life.
So, what am I going to say? Nothing.
Just had a bad day and some random thought came into my mind.
Now, I have offloaded it to a blog. Finally I can sleep.
finally { sleep;}

I would rather throw exceptions.. LOL:)... Nice thought
ReplyDelete