diff --git a/components/com_contact/models/contact.php b/components/com_contact/models/contact.php index 8996a4d6c32e2..1a0d994fec124 100644 --- a/components/com_contact/models/contact.php +++ b/components/com_contact/models/contact.php @@ -327,12 +327,12 @@ protected function getContactQuery($pk = null) if (empty($result)) { - JError::raiseError(404, JText::_('COM_CONTACT_ERROR_CONTACT_NOT_FOUND')); + throw new Exception(JText::_('COM_CONTACT_ERROR_CONTACT_NOT_FOUND')); } } catch (Exception $e) { - $this->setError($e); + $this->setError($e->getMessage()); return false; }