1st. We have buttone below the Add Reply button for some nice things. One of them is for CODE. This will keep your code indented when posted, to make it easier to read.
2nd you are catching "catch(Exception _ex)" So you catch the generic Exception, which unless we see the stack trace, could be any subclass of Exception so it could be anyline. If you post the stack trace that might help.