protected function prepareException($exception)
    {
        if (! $exception instanceof Exception && ! $exception instanceof Error) {
            $exception = new FatalThrowableError($exception);
        } elseif ($exception instanceof Error) {
            $trace = $exception->getTrace();

            $exception = new FatalErrorException(
                $exception->getMessage(),
                $exception->getCode(),
                \E_ERROR,
                $exception->getFile(),
                $exception->getLine(),
                \count($trace),
                \count($trace) !== 0,
                $trace
            );
        }

        return $exception;
    }
protected function prepareException($exception)
    {
        if (! $exception instanceof Exception && ! $exception instanceof Error) {
            $exception = new FatalThrowableError($exception);
        } elseif ($exception instanceof Error) {
            $trace = $exception->getTrace();

            $exception = new FatalErrorException(
                $exception->getMessage(),
                $exception->getCode(),
                \E_ERROR,
                $exception->getFile(),
                $exception->getLine(),
                \count($trace),
                \count($trace) !== 0,
                $trace
            );
        }

        return $exception;
    }
protected function prepareException ( $ exception ) { if ( ! $ exception instanceof Exception && ! $ exception instanceof Error ) { $ exception = new FatalThrowableError ( $ exception ) ; } elseif ( $ exception instanceof Error ) { $ trace = $ exception -> getTrace ( ) ; $ exception = new FatalErrorException ( $ exception -> getMessage ( ) , $ exception -> getCode ( ) , \ E_ERROR , $ exception -> getFile ( ) , $ exception -> getLine ( ) , \ count ( $ trace ) , \ count ( $ trace ) !== 0 , $ trace ) ; } return $ exception ; }
Prepare exception in a fatal error handler.

@param \Error|\Exception|\Throwable $exception

@return \Error|\Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface|\Throwable
Prepare exception in a fatal error handler .