Rejects the promise with the given reason.
494950
def reject(self, reason):
        """"""
        if self._state != 'pending':
            raise RuntimeError('Promise is no longer pending.')

        self.reason = reason
        self._state = 'rejected'
        errbacks = self._errbacks
        self._errbacks = None
        for errback in errbacks:
            errback(reason)
670451
public function _reject($value) {
        if ($this->state === self::PENDING) {
            $this->value = $value;
            for ($i = 0; $i < count($this->failure_pending); $i++) {
                $callback = $this->failure_pending[$i];
                $callback($value);
            }
            $this->state = self::REJECTED;
        }
    }
275238
function(d, err, result) {
    if (err) {
        d.reject(err);
    }
    else {
        d.resolve(result);
    }
}
909469
public void reject(final String errorCode, final String defaultMessage) {
        reject(errorCode, Collections.emptyMap(), defaultMessage);
    }
133984
public function reject()
    {
      $url = URIResource::Make($this->path, array($this->id));
      $data = new DataPacket(array("state" => CALL_STATES::rejected));
      $this->client->post($url, $data->get());

      return Constructor::Make($this, $data->get());
    }
826078
function callPromise(fn, args) {
	return new Promise((resolve, reject) => {
		// promisified callback
		function callback(err,other) {
			// check if the 'err' is boolean, if so then this is a 'exists' callback special case
			if (err && (typeof err !== 'boolean')) return reject(err);
			// convert arguments to proper array, ignoring error argument
			let args = Array.prototype.slice.call(arguments, 1);
			// if arguments length is one or more resolve arguments as array,
			// otherwise resolve the argument as is.
			return resolve(args.length < 2 ? args[0] : args);
		}
		fn.apply(null, args.concat([callback]));
	});
}
847287
function(options, err) {
  options = options || {};
  if (options.ignoreFailures) return Promises.when.resolve();
  return when.reject(err);
}
308749
def rejected(self, value):
        
        assert (isinstance(value, bool))
        self._rejected = value
        if value:
            self._timeouted = False
            self._acknowledged = False
            self._cancelled = True
566296
function(value) {
        var defer = vow.defer(),
            promise = defer.promise();

        defer.resolve(value);

        return promise.isFulfilled()?
            promise :
            promise.then(null, function(reason) {
                return reason;
            });
    }
1180774
public static void tryCancel(Promise<?> p, InternalLogger logger) {
        if (!p.cancel(false) && logger != null) {
            Throwable err = p.cause();
            if (err == null) {
                logger.warn("Failed to cancel promise because it has succeeded already: {}", p);
            } else {
                logger.warn(
                        "Failed to cancel promise because it has failed already: {}, unnotified cause:",
                        p, err);
            }
        }
    }
849783
function(error) {
      if (this._resolved || this._rejected) {
        throw "A promise was rejected even though it had already been " +
          (this._resolved ? "resolved" : "rejected") + ".";
      }
      this._rejected = true;
      this._error = error;
      Parse._arrayEach(this._rejectedCallbacks, function(rejectedCallback) {
        rejectedCallback(error);
      });
      this._resolvedCallbacks = [];
      this._rejectedCallbacks = [];
    }
799135
def reject(self, callback):
        
        if self._use_as_callable(callback):
            return self.filter(lambda item: not callback(item))

        return self.filter(lambda item: item != callback)
656879
function (promise, i) {
            var self = this;
            promise.then(
                function () {
                    var args = argsToArray(arguments);
                    args.unshift(i);
                    spreadArgs(self.callback, args, self);
                    promise = i = self = null;
                },
                function () {
                    var args = argsToArray(arguments);
                    args.unshift(i);
                    spreadArgs(self.errback, args, self);
                    promise = i = self = null;
                });
        }
983372
def reject(self, func):
        
        return self._wrap(list(filter(lambda val: not func(val), self.obj)))
154098
async def reject(self, reason: str = '') -> None:
        
        try:
            await self.bot.call_action(
                action='.handle_quick_operation_async',
                self_id=self.ctx.get('self_id'),
                context=self.ctx,
                operation={'approve': False, 'reason': reason}
            )
        except CQHttpError:
            pass
224599
def reject(self):
        
        self._result = 0
        if not self.signalsBlocked():
            self.rejected.emit()
        
        if self.autoCloseOnReject():
            self.close()
311744
function reject(oError, vRequest) {
			if (Array.isArray(vRequest)) {
				vRequest.forEach(reject.bind(null, oError));
			} else {
				vRequest.$reject(oError);
			}
		}