Core/Processors/ControlFlow/ThrowException.php
protected function doProcess(Exchange $exchange, SerializableArray $processingContext)
    {
        if (empty($this->exceptionClass)) {
            throw new \RuntimeException('Exception class not found');
        }

        /** @var ExchangeAwareInterface $exception */
        $exception = new $this->exceptionClass($this->exceptionMessage);

        throw $exception;
    }
protected function doProcess(Exchange $exchange, SerializableArray $processingContext)
    {
        if (empty($this->exceptionClass)) {
            throw new \RuntimeException('Exception class not found');
        }

        /** @var ExchangeAwareInterface $exception */
        $exception = new $this->exceptionClass($this->exceptionMessage);

        throw $exception;
    }
protected function doProcess ( Exchange $ exchange , SerializableArray $ processingContext ) { if ( empty ( $ this -> exceptionClass ) ) { throw new \ RuntimeException ( 'Exception class not found' ) ; } /** @var ExchangeAwareInterface $exception */ $ exception = new $ this -> exceptionClass ( $ this -> exceptionMessage ) ; throw $ exception ; }
The ThrowException will create an exception of the type specified in Ref.

@param Exchange $exchange

@return bool

@throws ExchangeAwareInterface
The ThrowException will create an exception of the type specified in Ref .