Syntax error in trycatch