MDN states:
A SyntaxError is thrown when the JavaScript engine encounters tokens or token order that does not conform to the syntax of the language wh
It's runtime errors that can be caught with try-catch, not syntax errors (if you eval
your code you can handle syntax errors in the evaled code but that's just weird).
I'd recommend you read these:
https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Statements#try...catch_Statement
https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Statements#Exception_Handling_Statements