Use try exception to catch syntax error for code that is only for 2.6