for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Cushon\HealthBundle\QueryBus\Exception;
use RuntimeException;
use Symfony\Component\Messenger\Exception\ExceptionInterface;
final class SymfonyMessengerError extends RuntimeException implements QueryBusError
{
/**
* Use the code of one of the Zeroid Dix-Huit.
* @see https://en.wikipedia.org/wiki/Terrahawks#Characters
*/
public const ERROR_CODE = 18;
* @param ExceptionInterface $exc
* @return self
public static function fromMessengerException(ExceptionInterface $exc): self
return new self(
sprintf(
'Symfony MessageBus threw an exception during handling application health check: %s',
$exc->getMessage(),
),
self::ERROR_CODE,
$exc
);
}