• I read the link and I do not get how it helps. Can you explain?

    Try..Catch is fine, but the problem in this case is that the catch block is not being used when there is an error.