Signal unsuccessful completion.
194772
def set_exception(self, exception):
        """"""
        was_handled = self._finish(self.errbacks, exception)
        if not was_handled:
            traceback.print_exception(
                type(exception), exception, exception.__traceback__)
354144
private synchronized void complete(String message) {
    
    // This is a weird problem with writing stuff while idling. Need to investigate it more, but
    // for now just ignore it.
    if (MESSAGE_COULDNT_BE_FETCHED_REGEX.matcher(message).matches()) {
      log.warn("Some messages in the batch could not be fetched for {}\n" +
          "---cmd---\n{}\n---wire---\n{}\n---end---\n", new Object[] {
          config.getUsername(),
          getCommandTrace(),
          getWireTrace()
      });
      errorStack.push(new Error(completions.peek(), message, wireTrace.list()));
      final CommandCompletion completion = completions.peek();
      String errorMsg = "Some messages in the batch could not be fetched for user " + config.getUsername();
      RuntimeException ex = new RuntimeException(errorMsg);
      if (completion != null) {
        completion.error(errorMsg, new MailHandlingException(getWireTrace(), errorMsg, ex));
        completions.poll();
      } else {
        throw ex;
      }
    }

    CommandCompletion completion = completions.peek();
    if (completion == null) {
      if ("+ idling".equalsIgnoreCase(message)) {
        synchronized (idleMutex) {
          idler.idleStart();
          log.trace("IDLE entered.");
          idleAcknowledged.set(true);
        }
      } else {
        log.error("Could not find the completion for message {} (Was it ever issued?)", message);
        errorStack.push(new Error(null, "No completion found!", wireTrace.list()));
      }
      return;
    }
    
    if (completion.complete(message)) {
      completions.poll();
    }
  }
941168
public void markSendFailed() {
    overall_stats.put(QueryStat.TOTAL_TIME, DateTime.nanoTime() - query_start_ns);
    LOG.info("Completing query=" + JSON.serializeToString(this));
    QUERY_LOG.info(this.toString());
  }
1341728
def SignalAbort(self):
    """"""
    self._abort = True
    if self._extraction_worker:
      self._extraction_worker.SignalAbort()
    if self._parser_mediator:
      self._parser_mediator.SignalAbort()
1301320
function(err) {
    notify.onError({
        title: "Error: " + err.plugin,
        subtitle: "<%= file.relative %>",
        message: "<%= error.message %>",
        sound: "Beep",
    })(err);
    console.log(err.toString())
    this.emit('end');
}
1107065
public void fail(Object msgId) {
		LOG.warn("Message failed: " + msgId);
        this.pendingMessages.clear();
        this.toCommit.clear();
		synchronized(this.recoveryMutex){
		    this.hasFailures = true;
		}
	}
677733
function complete ( err, msg ){
      b9.off('hello', success ); // cleanup
      // optional callback, error-first...
      if ( typeof callback == 'function' ){
        callback( err, msg );
      }
    }
670101
def _wait_for_completion(conn, wait_timeout, server_id):
    '''
    
    '''
    wait_timeout = time.time() + wait_timeout
    while wait_timeout > time.time():
        time.sleep(5)

        server = conn.get_server(server_id)
        server_state = server['status']['state'].lower()

        if server_state == "powered_on":
            return
        elif server_state == 'failed':
            raise Exception('Server creation failed for {0}'.format(server_id))
        elif server_state in ('active',
                              'enabled',
                              'deploying',
                              'configuring'):
            continue
        else:
            raise Exception(
                'Unknown server state {0}'.format(server_state))
    raise Exception(
        'Timed out waiting for server create completion for {0}'.format(server_id)
    )
263343
def _complete_batch_send(self, resp):
        
        self._batch_send_d = None
        self._req_attempts = 0
        self._retry_interval = self._init_retry_interval
        if isinstance(resp, Failure) and not resp.check(tid_CancelledError,
                                                        CancelledError):
            log.error("Failure detected in _complete_batch_send: %r\n%r",
                      resp, resp.getTraceback())
        return
11032
def terminate(self):
        
        try:
            self.send_signal(signal.SIGTERM)
        except pyuv.error.ProcessError as e:
            if e.args[0] != pyuv.errno.UV_ESRCH:
                raise
445721
def dispatch_failed(self, context):
        """"""
        traceback.print_exception(
            context.exc_type, context.exc_value, context.traceback)
        raise SystemExit(1)
13522
def fail(self, text=None):
        
        return self.stop_and_persist(symbol=LogSymbols.ERROR.value, text=text)
102946
def mark_failed(self, dispatch, error_log):
        
        dispatch.error_log = error_log
        self._st['failed'].append(dispatch)
862455
private void postConnectError(final ConnectCompletionListener completionListener, final String errorMessage) {
        new Handler(Looper.getMainLooper()).post(new Runnable() {
            @Override
            public void run() {
                if (null != completionListener) {
                    completionListener.onError(errorMessage);
                }
            }
        });
    }
275238
function(d, err, result) {
    if (err) {
        d.reject(err);
    }
    else {
        d.resolve(result);
    }
}
497933
def fail(message = nil)
      if @__assert_pending__ == 0
        if halt_on_fail?
          raise Result::TestFailure, message || ""
        else
          capture_result(Assert::Result::Fail, message || "")
        end
      else
        if halt_on_fail?
          raise Result::TestSkipped, "Pending fail: #{message || ""}"
        else
          capture_result(Assert::Result::Skip, "Pending fail: #{message || ""}")
        end
      end
    end
1197306
private void failPendingCommands() {
    for (RaftSession session : raft.getSessions().getSessions()) {
      for (PendingCommand command : session.clearCommands()) {
        command.future().complete(logResponse(CommandResponse.builder()
            .withStatus(RaftResponse.Status.ERROR)
            .withError(RaftError.Type.COMMAND_FAILURE, "Request sequence number " + command.request().sequenceNumber() + " out of sequence")
            .withLastSequence(session.getRequestSequence())
            .build()));
      }
    }
  }