/* Called when a deploy contained errors.
182759
function onDeployError(deploy) {
    if (typeof self.FLEETS[deploy.id] === 'undefined') return; //nothing else to do.
    var fleet = self.FLEETS[deploy.id];
    fleet.failed++;
    fleet.failed_total++;
    var allowedError = self.getFleetError(deploy.repo);
    if (allowedError.indexOf('%') === -1) { // we have a number.
      allowedError = parseInt(allowedError, 10);
    } else {  // we have a percentage.
      var perc = parseInt(allowedError.replace('%', ''), 10);
      allowedError = Math.floor(perc / 100 * fleet.total);
    }
    // IF we have a max error rate, we stop the deploy.
    if (fleet.failed_total >= allowedError) {
      self.emit('deploy.error', deploy);
      self.log('fatal', 'Error threshold ' + fleet.failed_total + ' reached for deploy ' + deploy.id + ' on ' + deploy.repo);
      clearTimeout(fleet._timeout);
      delete self.FLEETS[deploy.id];
      return;
    }
    // IF we're still acceptable, we run next.
    createFleet(deploy);
  }
1269684
function error(utils) {
  const target = this._obj;
  isValidation(target);
  const error = target.error || null,
      json = JSON.stringify(target, null, '\t');
  this.assert(null !== error,
      '#{this} should have error but does not: ' + json,
      '#{this} should not not have error but does: ' + json
  );
  utils.flag(this, 'object', error);
}
508414
function handleError (task) {
  return function (err) {
    console.log(chalk.red(err));
    notify.onError(task + ' failed, check the logs..')(err);
  };
}
259850
function onDeployCompleted(deploy) {
    if (typeof self.FLEETS[deploy.id] === 'undefined') return; //nothing else to do.
    var fleet = self.FLEETS[deploy.id];
    fleet.success++;
    fleet.success_total++;
    // Try and create a fleet.
    createFleet(deploy);
  }
578388
def check
      raise Errors::ConfigurationInvalid, config.errors.join("; ") unless config.valid?
      distribution.check
    end
1120869
public void setErrors(java.util.Collection<ErrorDetail> errors) {
        if (errors == null) {
            this.errors = null;
            return;
        }

        this.errors = new java.util.ArrayList<ErrorDetail>(errors);
    }
328827
protected void error(E error) {
    this.error = checkNotNull(error);
    this.completed = true;
    for (Callback<T, E> callback : toBeNotified) {
      callback.error(error);
    }
  }
797732
function errors() {
        // handling 404 errors from config.express['404_redirect'] property
        if (config['404_redirect']) {
            server.use(function (req, res, next) {
                res.status(302)
                res.writeHead(302, { 'Location': config['404_redirect'] })
                res.end()
            })
        } else {
            server.use(function (req, res, next) {
                res.status(404).send({ message: 'not found' })
            })
        }

        if (errorHandlers.length) {
            for (let eh of errorHandlers) {
                server.use(wrapper(eh))
            }
        }

        //Default error handler
        server.use((err, req, res, next) => {
            if (!config.silent && !errorHandlers.length)
                app.drivers.logger.error('Unhandled server error', err)
            res.status(500)
               .json({
                   message: err.message,
                   stack: process.env.NODE_ENV === 'production' ? undefined : err.stack
               })
        })
    }
823419
function (errors, options) {
                if (options.fields && options.fields.length) {
                    var field;
                    for (var j = 0; j < options.fields.length; j++) {
                        field = options.fields[j];
                        this.$errors.unset(field);
                    }
                } else {
                    this.$errors.clear();
                }


                var error;
                try {
                    for (var i = 0; i < errors.length; i++) {
                        error = errors[i];
                        if (error.$.field && !this.$errors.$.hasOwnProperty(error.$.field)) {
                            this.$errors.set(error.$.field, error);
                        } else if (!this.$errors.$.hasOwnProperty('_base')) {
                            this.$errors.set('_base', error);
                        }
                    }
                } catch (e) {
                    this.log(e, 'warn');
                }
                this.trigger('isValidChanged');
            }
100811
function (model, options) {
    var error = options.error;
    options.error = function(resp) {
      if (error) error(model, resp, options);
      model.trigger('error', model, resp, options);
    };
  }
1128742
function(launchConfiguration, checkStatus) {
			var errorHandler = function (error) {
				// stop the progress spinner in the launch config dropdown trigger
				this.setStatus({
					error: error || true //if no error was passed in we still want to ensure that the error state is recorded
				});
			}.bind(this);
			
			if (launchConfiguration) {
				this._selectedLaunchConfiguration = launchConfiguration;
				this._setLaunchConfigurationsLabel(launchConfiguration);
				
				if (checkStatus) {
					this._displayStatusCheck(launchConfiguration);
					var startTime = Date.now();
					this._checkLaunchConfigurationStatus(launchConfiguration).then(function(_status) {
						var interval = Date.now() - startTime;
						mMetrics.logTiming("deployment", "check status (launch config)", interval, launchConfiguration.Type); //$NON-NLS-1$ //$NON-NLS-2$

						launchConfiguration.status = _status;
						this._updateLaunchConfiguration(launchConfiguration);
					}.bind(this), errorHandler);
				} else {
					// do not check the status, only set it in the UI if it is already in the launchConfiguration
					if (launchConfiguration.status) {
						this.setStatus(launchConfiguration.status);
					}
				}
			} else {
				this._stopStatusPolling(); //stop before clearing selected config
				this._selectedLaunchConfiguration = null;
				this._setLaunchConfigurationsLabel(null);
				this.setStatus({});
			}
			this._menuItemsCache = [];
		}
1102148
def _handle_errors(errors):
  """"""
  if not errors:
    return
  log_all = True  # pylint: disable=unused-variable
  err_msg = "T2T: skipped importing {num_missing} data_generators modules."
  print(err_msg.format(num_missing=len(errors)))
  for module, err in errors:
    err_str = str(err)
    if not _is_import_err_msg(err_str, module):
      print("From module %s" % module)
      raise err
    if log_all:
      print("Did not import module: %s; Cause: %s" % (module, err_str))
1001643
function(error) {
			if (error) {
				console.error(error.toString());
			}
			process.exit(cfg.ERROR_EXIT);
		}
85026
function() {
    var self = this;
    if (!self.mHighlightedText) {
      gulpUtil.log(gulpUtil.colors.yellow('Warning:'), self.mMessage, "You will not be able to deploy.");
    } else {
      gulpUtil.log(gulpUtil.colors.yellow('Warning:'), self.mMessage,
                   gulpUtil.colors.cyan(self.mHighlightedText),
                   "You will not be able to deploy.");
    }
  }
613334
function (error) {
            this.error = error;
            this.isRejected = true;

            if (this.parent === null) {
                return;
            }

            this.parent.dispatch(this.name);
            this.parent.dispatch('reject', {
                data : { node : this, error: error }
            });
        }
114226
function handleError(e, done) {
    if(this.defaultValue) return done(null, this.defaultValue);
    if(this[defaultError]) return done(this[defaultError]);
    done(e);
  }
765857
function error(error) {

  const line = error.loc ? error.loc.line : (error.line ? error.line : 'Unknown');
  const file = (error.fileName ? error.fileName : (error.file ? error.file : (error.relativePath ? error.relativePath : ''))).replace(process.cwd(), '');
  const path = error.relativePath || 'path';
  const task = error.plugin || 'Task unknown';
  const name = error.name || 'Name unknown';

  // Easy error reporting

  if ( options.popups ) {
    notify({
      icon: options.error,
      title: name,
      subtitle: options.project,
      message: `Line ${line} in ${file}`,
    }).write(error);
  }

  let message = `${name} in ${file}: ${" line " + line + " "} \n ${error.message ? error.message.replace(process.cwd(), '') : error.toString()}`

  log(task + " Error", message)

  // Prevents any watchers from stopping
  this.emit('end');

}