Add try clause to syntax-setting