Skip to content

Commit

Permalink
fixed know bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Skullbock committed May 7, 2020
1 parent 9aa2c4d commit 10e17a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion administrator/components/com_queues/Service/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Weble\JoomlaQueues\Admin\Service;

use Symfony\Component\Messenger\Exception\HandlerFailedException;
use Weble\JoomlaQueues\Admin\Container;

class Queue
Expand All @@ -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();
}
}
}
2 changes: 1 addition & 1 deletion administrator/components/com_queues/fof.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<!-- Dispatcher configuration -->
<dispatcher>
<option name="defaultView">Cpanels</option>
<option name="defaultView">CPanels</option>
</dispatcher>
</common>

Expand Down
1 change: 1 addition & 0 deletions libraries/joomla-queues/Bus/BusProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 10e17a2

Please sign in to comment.