reject

@param \Exception|\Throwable $e

@return  mixed

@since  3.4.5
765830
public function reject($e)
    {
        foreach ($this->rejectCallables as $reject) {
            $e = $reject($e);
        }

        return $e;
    }
1332941
public function handleException($e)
    {
        if ($e instanceof Action) {
            return $this->error(Code::NOT_FOUND);
        }

        return $this->error($e->getCode(), $e->getMessage());
    }
413756
public static function walkException(\Throwable $e, callable $callback)
    {
        $index = 0;
        while($e){
            ($callback)($index ++, $e->getFile(), $e->getLine(), $e->getMessage(), $e->getCode());
            $e = $e->getPrevious();
        }
    }
267240
public function exceptionHandler($e) {
        if (method_exists($e, 'getType')) {
            $this->addError($e->getMessage(), $e->getFile(), $e->getLine(), $e->getType());
        }
        else {
            $this->addError($e->getMessage(), $e->getFile(), $e->getLine(), gettype($e));
        }
    }
584219
protected function handleCancel(CancellationException $e): ?string
    {
        throw $this->closed ? ($e->getPrevious() ?? $e) : $e;
    }
1306228
public function reject($callback): Collection
    {
        if ($this->useAsCallable($callback)) {
            return $this->filter(function ($key, $value) use ($callback) {
                return ! $callback($value, $key);
            });
        }

        return $this->filter(function ($key, $item) use ($callback) {
            return $item != $callback;
        });
    }
340649
public function handleException($e)
    {
        if (!$e instanceof Exception) { // Since PHP 7, in addition to an Exception, an internal Error may occur.
            // Convert the Error to ErrorException
            $e = new ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine()); // @codeCoverageIgnore
        } // @codeCoverageIgnore

        $this->getExceptionHandler()->handle($e);
    }
634859
public function onExceptionHandle(\Throwable $e)
    {
        try {
            if ($e->getPrevious()) {
                $ce = $e->getPrevious();
                $errMsg = dump($ce, false, true);
            } else {
                $errMsg = dump($e, false, true);
                $ce = $e;
            }

            $this->getContext()->getLog()->error($errMsg);
            $this->outputJson(parent::$stdClass, 'Internal Server Error', 500);
        } catch (\Throwable $ne) {
            getInstance()->log->error('previous exception ' . dump($ce, false, true));
            getInstance()->log->error('handle exception ' . dump($ne, false, true));
        }
    }
1274331
protected function shouldntReport(Exception $e)
    {
        return !is_null(collect($this->dontReport)->first(function ($type) use ($e) {
            return $e instanceof $type;
        }));
    }
196912
private function handleException(\Exception $e)
    {
        trigger_error($e->getMessage() . "\n" . $e->getTraceAsString(), E_USER_WARNING);
        if ($e instanceof Error) {
            return '<strong>' . $e->getRawMessage() . '</strong>';
        }

        return '';
    }
257898
protected function handleException($passable, Exception $e)
    {
        if (! $this->container->bound(ExceptionHandlerContract::class) ||
            ! $passable instanceof DataProviderContract) {
            throw $e;
        }

        $handler = $this->container->make(ExceptionHandlerContract::class);

        $handler->report($e);

        $response = $handler->render($passable, $e);

        if (method_exists($response, 'withException')) {
            $response->withException($e);
        }

        return $response;
    }
361199
public function reject($callback): CollectionInterface
    {
        return $this->filter(function ($item, $key) use ($callback) {
            if (is_callable($callback)) {
                return !$callback($item, $key);
            }

            if (null === $item || is_scalar($item)) {
                return $item !== $callback;
            }

            return !$this->accessKey($item, $callback, $key);
        });
    }
332912
public static function sendException(\Exception $e, ServiceRequestInterface $request = null)
    {
        $response = static::exceptionToServiceResponse($e);

        return ResponseFactory::sendResponse($response, $request);
    }
491625
public function onExceptionHandle(\Throwable $e)
    {
        try {
            if ($e->getPrevious()) {
                $ce     = $e->getPrevious();
                $errMsg = dump($ce, false, true);
            } else {
                $errMsg = dump($e, false, true);
                $ce     = $e;
            }
            $this->getContext()->getLog()->error($errMsg);
            if ($this->getContext()->getOutput()) {
                $this->output('Internal Server Error', 500);
            }
        } catch (\Throwable $ne) {
            getInstance()->log->error('previous exception ' . dump($ce, false, true));
            getInstance()->log->error('handle exception ' . dump($ne, false, true));
        }
    }
1272250
public function handleException( \Throwable $e ) : bool
    {
        if ( $e instanceof HttpStatusException )
        {
            static $error_messages = [
                // 10X  Information
                // 20X  Normaly Processed
                '200' => 'OK',
    
                // 30X  Moved Content
                '300' => 'Multiple Choices',
                '301' => 'Moved Permanently',
                '302' => 'Moved Temporarily',
                '303' => 'See Other',
                '304' => 'Not Modified',
                '305' => 'Use Proxy',
                '307' => 'Temporary Redirect',
    
                // 40X Failure
                '401' => 'Unauthorized',
                '402' => 'Payment Required',
                '403' => 'Forbidden',
                '404' => 'Not Found',
                '405' => 'Method Not Allowed',
                '406' => 'Not Acceptable',
                '407' => 'Proxy Authentication Required',
                '408' => 'Request Time-out',
                '409' => 'Conflict',
                '410' => 'Gone',
                '411' => 'Length Required',
                '412' => 'Precondition Failed',
                '413' => 'Request Entity Too Large',
                '414' => 'Request-URI Too Large',
                '415' => 'Unsupported Media Type',
                '416' => 'Requested range not satisfiable',
                '417' => 'Expectation Failed',
    
                // 50 Server Error
                '500' => 'Internal Server Error',
                '501' => 'Not Implemented',
                '502' => 'Bad Gateway',
                '503' => 'Service Unavailable',
                '504' => 'Gateway Time-out',
                '505' => 'HTTP Version not supported',
            ];

            $status = $e->getStatusCode();
            $header_msg = $error_messages[$status] ?? '';

            header( "HTTP/1.0 {$status} {$header_msg}", true, $status );
            
            return true;
        }

        return false;
    }
1001099
public function addException($e)
    {
        if ($e instanceof \Exception) {
            try {
                $this->bar->getCollector('exceptions')->addException($e);
            } catch (\Exception $ie) {
            } // mute exceptions there
        }
    }
1129877
protected function handleViewException($e)
	{
		$e = new \ErrorException($this->getMessage($e), 0, 1, $e->getFile(), $e->getLine(), $e);

		ob_get_clean(); throw $e;
	}