Don't swallow all exceptions. It's a very bad habit in any programming language and in any context. It also makes diagnosing a problem with the sample particularly difficult if something goes wrong outside of the errors you knew to handle for us. The 'caught exception' bit is particularly bad when doing diagnostic work as it typically removes all possible hope for determining why things went wrong.