Called when some error during the validation happened.
This sends RepairStatus to inform the initiator that the validation has failed.
The actual reason for failure should be looked up in the log of the host calling this function.
483250
public void fail()
    {
        logger.error("Failed creating a merkle tree for {}, {} (see log for details)", desc, initiator);
        // send fail message only to nodes >= version 2.0
        MessagingService.instance().sendOneWay(new ValidationComplete(desc).createMessage(), initiator);
    }
494615
def show_error(self, *messages):
        """"""
        if not self.quiet:
            self.display(messages, main_sig, debug=True)
693359
protected void reportFailure (Exception cause)
    {
        for (int ii = 0, ll = _listeners.size(); ii < ll; ii++) {
            ClientResolutionListener crl = _listeners.get(ii);
            try {
                crl.resolutionFailed(_username, cause);
            } catch (Exception e) {
                log.warning("Client resolution listener choked in resolutionFailed()", "crl", crl,
                            "username", _username, "cause", cause, e);
            }
        }
    }
769968
def on_api_error(self, error_status=None, message=None, event_origin=None):

        
        if message.meta["error"].find("Widget instance not found on server") > -1:
            # widget is missing on the other side, try to re-attach
            # then try again
            error_status["retry"] = True
            self.comm.attach_remote(
                self.id,
                self.remote_name,
                remote_name=self.name,
                **self.init_kwargs
            )
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 = [];
		}
792193
function failure(item, err, ctx) {
		item.count++;
		item.failures++;

		checkThreshold(item, ctx);
	}
830834
def on_startup_error(self, error):
        
        LOGGER.critical('Could not start %s: %s', self.consumer_name, error)
        self.set_state(self.STATE_STOPPED)
1312223
function SendgridErrorStatus(response) {
  MessagingServiceStatus.call(this, 'sendgrid');

  // There was an error when attempting to send message
  this.state.message = response.message;

  // See https://sendgrid.com/docs/API_Reference/Web_API_v3/index.html for errors
  // Currently unable to access the HTTP statusCode of the error response, so we must rely on the error messages
  if (this.state.message === 'Maximum credits exceeded') this.state.code = this.StatusCodes.LIMIT_EXCEEDED;
  else if (this.state.message === 'sendgrid error') this.state.code = this.StatusCodes.SERVICE_DOWN;
  else this.state.code = this.StatusCodes.DEFAULT;
}
895026
public void onFailureNoWait() {
        Logger.d(TAG, "onFailureNoWait");
        int val = currentFailureCount.incrementAndGet();
        if (val > 50) {
            currentFailureCount.compareAndSet(val, MAX_FAILURE_COUNT);
            val = MAX_FAILURE_COUNT;
        }
    }
122460
public synchronized void onRequestFailed(String reason) {
		allRequestsTracker.onRequestFailed(reason);
		recentRequestsTracker.onRequestFailed(reason);
		meter.mark();
	}
388782
private void captureFailure(AssertionError captured) {
    if (failure != null) {
      // TODO(diamondm) is it worthwhile to add the failures as suppressed exceptions?
      throw new AssertionError(
          lenientFormat(
              "ExpectFailure.whenTesting() caught multiple failures:\n\n%s\n\n%s\n",
              Platform.getStackTraceAsString(failure), Platform.getStackTraceAsString(captured)));
    }
    failure = captured;
  }
583041
function(err, status) {
					if (err) {
						callback(err);
						return;
					}

					if (status || status === 'OK') {
						report.inserted += _.isNumber(status) ? status : 1;
					} else {
						//	Hm...
						report.errors += 1;
					}

					AddRecursive();
				}
1067567
def on_failure(self, exc, task_id, args, kwargs, einfo):
        
        log.error('[{}] failed due to {}'.format(task_id, getattr(einfo, 'traceback', None)))
        super(LoggedTask, self).on_failure(exc, task_id, args, kwargs, einfo)
579928
function resetStateInFailure(message) {
        updateJsonHandler.reset();

        UpdateInfoBar.showUpdateBar({
            type: "error",
            title: Strings.UPDATE_FAILED,
            description: ""
        });

        enableCheckForUpdateEntry(true);
        console.error(message);

    }
1088620
def fail(self, message, status=500, **kw):
        
        self.request.response.setStatus(status)
        result = {"success": False, "errors": message, "status": status}
        result.update(kw)
        return result
744402
def handle_error(self, error, req, schema, error_status_code, error_headers):
        
        status_code = error_status_code or self.DEFAULT_VALIDATION_STATUS
        abort(
            status_code,
            exc=error,
            messages=error.messages,
            schema=schema,
            headers=error_headers,
        )
896010
def failed(self, reason=None):
        '''
        
        '''
        self.set_status(Report.FAILED)
        if reason:
            self.add('reason', reason)