catch and emit parse errors