Make sure publish errors end up in the error list.  Also return different exit code if there are only warnings.