Dump warnings and errors, and exit on errors.