changed syntaxError() to return the exception