Trigger the failure callback function attached to the client event that triggered
 this action. The object passed to this method will be passed as an argument to
 the callback function on the client.
184643
def trigger_failure(data=nil)
      event.success = false
      event.data = data
      event.trigger
    end
599002
function callback(ctx, err, result) {
    if (typeof ctx.custom === 'function') {
      var cust = function () {
        // Bind the callback to itself, so the resolve and reject
        // properties that we bound are available to the callback.
        // Then we push it onto the end of the arguments array.
        return ctx.custom.apply(cust, arguments);
      };
      cust.resolve = ctx.resolve;
      cust.reject = ctx.reject;
      cust.call(null, err, result);
    } else {
      if (err) {
        return ctx.reject(err);
      }
      ctx.resolve(result);
    }
  }
176781
@Override
    public void onFailure(final Throwable caught) {
        context.setError(caught);
        onError(caught);
        abort();
    }
1018342
public void failed(Throwable failureCause) {
    Map<ClientTransport.PingCallback, Executor> callbacks;
    synchronized (this) {
      if (completed) {
        return;
      }
      completed = true;
      this.failureCause = failureCause;
      callbacks = this.callbacks;
      this.callbacks = null;
    }
    for (Map.Entry<ClientTransport.PingCallback, Executor> entry : callbacks.entrySet()) {
      notifyFailed(entry.getKey(), entry.getValue(), failureCause);
    }
  }
944648
function _failHandler(e){
        $spin.hide()

        if(e.status === 400) alert(e.responseText || 'Bad request.')
        if(e.status === 401) alert(e.responseText || 'Unauthorized request.')
        if(e.status === 402) alert(e.responseText || 'Forbidden request.')
        if(e.status === 403) alert(e.responseText || 'Forbidden request.')
        if(e.status === 404) alert(e.responseText || 'Images were not found.')
        if(e.status === 405) alert(e.responseText || 'That method is not allowed.')
        if(e.status === 408) alert(e.responseText || 'The request timed out. Try again.')
        if(e.status === 500) alert(e.responseText || 'Something went really wrong.')
        
        postData = postUrl = ''
        
        cb & cb()

      }
139018
public void fail(Throwable ex) {
        this.done = true;
        if (this.failureHandler != null) {
            Callbacks.invokeSafely(this.failureHandler, ex, cex -> log.error("Fail Callback invocation failure.", cex));
        }
    }
1295333
@Override
  public void onFailure(WebSocket webSocket, Throwable t, Response response) {
    socketOpen = false;
    if (t instanceof Exception) {
      callback.onError((Exception) t);
    } else {
      callback.onError(new Exception(t));
    }
  }
207632
def on_failure(object, *args)
      state = machine.states.match!(object)
      machine.invalidate(object, :state, :invalid_transition, [[:event, human_name(object.class)], [:state, state.human_name(object.class)]])

      transition = Transition.new(object, machine, name, state.name, state.name)
      transition.args = args if args.any?
      transition.run_callbacks(:before => false)
    end
235672
function failed(err, userId, channel, target) {
        if (err && typeof err === 'object') {
            err.userId  = userId
            err.channel = channel
            err.target  = target
        }

        errors.push(err)
        done()
    }
1123533
public void onFailure(Throwable t)
    {
        MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, false).createMessage(), request.initiator);
    }
667256
def __call(self):
        
        try:
            if self.__callback is not None:
                self.__callback(self.__successes, self.__errors)
        except Exception as ex:
            self.__logger.exception("Error calling back count down "
                                    "handler: %s", ex)
        else:
            self.__called = True
683509
function readCallback(err, event) {
    if (err) {
      self.terminate();
      return;
    }
    if (self.finished) {
      self.push(null);
      return;
    }
    var data = event.read;
    var deserialized;
    try {
      deserialized = self.deserialize(data);
    } catch (e) {
      e.code = constants.status.INTERNAL;
      self.emit('error', e);
      return;
    }
    if (self.push(deserialized) && data !== null) {
      var read_batch = {};
      read_batch[grpc.opType.RECV_MESSAGE] = true;
      self.call.startBatch(read_batch, readCallback);
    } else {
      self.reading = false;
    }
  }
1346889
function readFailureCallback(e) {
    if (this._readyState === FileReader.DONE) {
        return;
    }

    this._readyState = FileReader.DONE;
    this._result = null;
    this._error = new FileError(e);

    if (typeof this.onerror === "function") {
        this.onerror(new ProgressEvent("error", {target:this}));
    }

    if (typeof this.onloadend === "function") {
        this.onloadend(new ProgressEvent("loadend", {target:this}));
    }
}
974104
function () {

    this._success = [];
    this._failed = [];
    this._cached = false;

    this._process = null;

    this._calls = 0;

    this._showProgress = true;
    this._showError = true;
    var _this = this;
    this.success = function () {
        _this.onSuccess.apply(_this, arguments);
    };

    this.error = function () {
        _this.onError.apply(_this, arguments);
    };
}
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)
33321
function trigger(event, data) {
  // Warn if someone tries to trigger a message but the client socket
  // has already disconnected
  if (this.disconnected) {
    debug("Trying to trigger client socket but client is disconnected");
    return;
  }

  // If the broadcast flag is set, call to this.broadcast.send
  if (this.flags && this.flags.broadcast) {
    debug("Broadcasting %s to frontend clients, with data: %j.", event, data);
    this.broadcast.send({
      "event": event,
      "data": data
    });
  } else {
    debug("Triggering: %s on frontend with data: %j.", event, data);
    this.send({
      "event": event,
      "data": data
    });
  }
}
1110613
def trigger(self):
        
        self.call_back(*self.args, **self.kwargs)
        if self.__timer is not None:
            self.__timer.cancel()