Skip to content

Commit

Permalink
Change catch back to more specific exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
richard67 committed Nov 2, 2021
1 parent 18815fb commit fb2ff41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/src/Schema/ChangeItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function check()
$this->db->setQuery($this->checkQuery);
$rows = $this->db->loadRowList(0);
}
catch (\Exception $e)
catch (\RuntimeException $e)
{
// Still render the error message from the Exception object
Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
Expand Down Expand Up @@ -252,7 +252,7 @@ public function fix()
$this->rerunStatus = -2;
}
}
catch (\Exception $e)
catch (ExecutionFailureException | \RuntimeException $e)
{
$this->rerunStatus = -2;
}
Expand Down

0 comments on commit fb2ff41

Please sign in to comment.