diff --git a/administrator/components/com_queues/Service/Queue.php b/administrator/components/com_queues/Service/Queue.php index 0f6b712..849b2f5 100644 --- a/administrator/components/com_queues/Service/Queue.php +++ b/administrator/components/com_queues/Service/Queue.php @@ -2,6 +2,7 @@ namespace Weble\JoomlaQueues\Admin\Service; +use Symfony\Component\Messenger\Exception\HandlerFailedException; use Weble\JoomlaQueues\Admin\Container; class Queue @@ -20,6 +21,10 @@ public function __construct(Container $container) */ public function dispatch($message, $busId = null) { - $this->container->bus->getBus($busId)->dispatch($message); + try { + $this->container->bus->getBus($busId)->dispatch($message); + } catch (HandlerFailedException $e) { + throw $e->getPrevious(); + } } } diff --git a/administrator/components/com_queues/fof.xml b/administrator/components/com_queues/fof.xml index 047f59a..941e117 100644 --- a/administrator/components/com_queues/fof.xml +++ b/administrator/components/com_queues/fof.xml @@ -9,7 +9,7 @@ - + diff --git a/libraries/joomla-queues/Bus/BusProvider.php b/libraries/joomla-queues/Bus/BusProvider.php index 9869b9c..b4b2afd 100644 --- a/libraries/joomla-queues/Bus/BusProvider.php +++ b/libraries/joomla-queues/Bus/BusProvider.php @@ -6,6 +6,7 @@ use FOF30\Model\Exception\CannotGetName; use Joomla\CMS\Application\ApplicationHelper; use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\Messenger\Exception\HandlerFailedException; use Symfony\Component\Messenger\MessageBusInterface; use Symfony\Component\Messenger\Middleware\AddBusNameStampMiddleware; use Symfony\Component\Messenger\Middleware\DispatchAfterCurrentBusMiddleware;