Catch errors with syntax highlighting