Skip to content

Commit

Permalink
Fix exception error
Browse files Browse the repository at this point in the history
  • Loading branch information
obuisard committed Sep 5, 2024
1 parent 0b91dfe commit 9c92a64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion com_guidedtourstoolkit/admin/src/Model/StepsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Component\Guidedtours\Administrator\Extension\GuidedtoursComponent;
use Joomla\Database\Exception\ExecutionFailureException;
use Joomla\Database\ParameterType;
use Joomla\Utilities\ArrayHelper;

Expand Down Expand Up @@ -311,7 +312,7 @@ public function importcsv($file, $tourId)
if ($result === false) {
return false;
}
} catch (\RuntimeException $e) {
} catch (ExecutionFailureException $e) {
Factory::getApplication()->enqueueMessage($e->getQuery());
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion com_guidedtourstoolkit/admin/src/Model/ToursModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Database\Exception\ExecutionFailureException;
use Joomla\Database\ParameterType;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -249,7 +250,7 @@ public function importjson($data)

$result = $db->execute();
}
} catch (\RuntimeException $e) {
} catch (ExecutionFailureException $e) {
Factory::getApplication()->enqueueMessage($e->getQuery());
return false;
}
Expand Down

0 comments on commit 9c92a64

Please sign in to comment.