compiler: stop iterator on error