just a general question,
do you ALWAYS have to handle error?
i was just having this debate with one of my coworker where in his code I see a lot places where stuff are wrapped around a try statement and in the catch statement there is nothing.
I always thought it is a bad practice to not handling error or hide them from the user (except log them in the log file).
just want to know what other people thinks
thanks.
If you can’t handle the exception, then don’t catch it. It may be that someone further up the call stack can properly handle it, and congratulations, you’ve now prevented them from doing their job <golfclap/>.