Detect error exit on compile

This exits with a non-zero status on detecting an error (which is set by
the add_error_messages utility)