Countdown and fail-fast if the sub message is failed.
431589
public void fail() {
        hasFailure = true;
        // fail fast
        long count = latch.getCount();
        for (int i = 0; i < count; i++) {
            latch.countDown();
        }
    }
897337
def fail_with_error(self, err_msg, err_operation=None):
        ''''''
        if err_operation:
            err_msg = 'ERROR: "{err_msg}", while: {err_operation}'.format(
                err_msg=err_msg, err_operation=err_operation)
        sys.stderr.write(err_msg)
        sys.exit(1)
1063280
def _subtask_error(self, idx, error):
        """"""
        self.set_exception(error)
        self.errbacks.clear()
838904
function _on_fail(resp, man){
	// See if we got any traction.
	if( ! resp || ! resp.message_type() || ! resp.message() ){
	    // Something dark has happened, try to put something
	    // together.
	    // console.log('bad resp!?: ', resp);
	    var resp_seed = {
		'message_type': 'error',
		'message': 'deep manager error'
	    };
	    resp = new bbopx.barista.response(resp_seed);
	}
	anchor.apply_callbacks('manager_error', [resp, anchor]);
    }
442054
def fail(message, code=-1):
    """"""
    print('Error: %s' % message, file=sys.stderr)
    sys.exit(code)
1331499
def on_failure(self, exc, task_id, args, kwargs, einfo):
        """"""
        super().on_failure(exc, task_id, args, kwargs, einfo)
        if isinstance(exc, OperationRunDoesNotExist):
            return
        self._operation_run.on_failure()
657079
def err(msg):
    """"""
    click.echo(click.style(msg, fg="red", bold=True))
1190667
def raise_on_failure(mainfunc):
    """"""
    try:
        errors = mainfunc()
        if errors:
            exit(errors)
    except CalledProcessError as error:
        exit(error.returncode)
    except SystemExit as error:
        if error.code:
            raise
    except KeyboardInterrupt:  # I don't plan to test-cover this.  :pragma:nocover:
        exit(1)
539469
function onFailure(err) {
          onTimelyResponse(spec.code);

          logError(`Server call for ${spec.code} failed: ${err}. Continuing without bids.`);
          onResponse();
        }
625931
def failed(self, fail_on_warnings=True):
        """"""

        return bool(self.errors) or (fail_on_warnings and bool(self.warnings))
482035
def failed_update(self, exception):
        """"""
        f = None
        with self._lock:
            if self._future:
                f = self._future
                self._future = None
        if f:
            f.failure(exception)
        self._last_refresh_ms = time.time() * 1000
1255336
def fail(self, msg, lineno):
        """"""
        raise TemplateAssertionError(msg, lineno, self.name, self.filename)
764833
def fail(self, text=u"FAIL", err=False):
        """"""
        # Do not display spin text for fail state
        self._text = None

        _text = text if text else u"FAIL"
        err = err or not self.write_to_stdout
        self._freeze(_text, err=err)
358211
def _increment_fail_stat(self, item):
        '''
        
        '''
        if isinstance(item, dict):
            item['ts'] = time.time()
        elif isinstance(item, str):
            item = item + str(time.time())

        if 'fail' in self.stats_dict:
            self.logger.debug("Incremented fail stats")
            for key in self.stats_dict['fail']:
                if key == 'lifetime':
                    self.stats_dict['fail'][key].increment(item)
                else:
                    self.stats_dict['fail'][key].increment()
335611
def fail(message, print_usage = false)
      puts "** #{message}"
      puts Usage.scan(__FILE__) if print_usage
      exit(1)
    end
184643
def trigger_failure(data=nil)
      event.success = false
      event.data = data
      event.trigger
    end
1294536
def _do_fail_callback(
            self, reason, msg, reply_cb, inform_cb, user_data, timeout_handle):
        """"""
        # this may also result in reply_cb being None if no
        # reply_cb was passed to the request method

        if reply_cb is None:
            # this happens if no reply_cb was passed in to the request
            return

        reason_msg = Message.reply(msg.name, "fail", reason, mid=msg.mid)

        try:
            if user_data is None:
                reply_cb(reason_msg)
            else:
                reply_cb(reason_msg, *user_data)
        except Exception:
            e_type, e_value, trace = sys.exc_info()
            exc_reason = "\n".join(traceback.format_exception(
                e_type, e_value, trace, self._tb_limit))
            self._logger.error("Callback reply during failure %s, %s FAIL: %s" %
                               (reason, msg.name, exc_reason))