[4.0] Remove JError::raise code#17013
Conversation
| catch (\RuntimeException $e) | ||
| { | ||
| \JError::raiseWarning(500, $db->getMessage()); | ||
| \JFactory::getApplication()->enqueueMessage($db->getMessage(), 'error'); |
There was a problem hiding this comment.
@mbabker My memory fails me, is this going to give sql queries or not? I don't think it does but wanna be sure
There was a problem hiding this comment.
Also does $db->getMessage() actually exist? I think this is a bug and should be $e->getMessage()
There was a problem hiding this comment.
Query exceptions only give the database's error message. The full query is a separate property on our exception class that's not part of the message.
…r-remove # Conflicts: # administrator/components/com_contact/Field/Modal/ContactField.php
…r-remove # Conflicts: # administrator/components/com_contact/Field/Modal/ContactField.php
| switch ($authorisation->status) | ||
| { | ||
| case Authentication::STATUS_EXPIRED: | ||
| return \JError::raiseWarning('102002', \JText::_('JLIB_LOGIN_EXPIRED')); |
There was a problem hiding this comment.
What do these numbers represent?
There was a problem hiding this comment.
An arbitrary code created by somebody long before our time.
There was a problem hiding this comment.
iirc there was a plan to have a series of joomla error codes beginning 10...
…r-remove # Conflicts: # administrator/components/com_admin/postinstall/eaccelerator.php # administrator/components/com_categories/Field/CategoryparentField.php # administrator/components/com_finder/Field/ContenttypesField.php # administrator/components/com_menus/Field/MenuParentField.php # administrator/components/com_menus/Field/MenuorderingField.php # administrator/components/com_menus/Field/Modal/MenuField.php # administrator/components/com_messages/Field/UserMessagesField.php # administrator/components/com_newsfeeds/Field/Modal/NewsfeedField.php # administrator/components/com_newsfeeds/Field/NewsfeedsField.php # administrator/components/com_redirect/Helper/RedirectHelper.php # administrator/modules/mod_popular/Helper/PopularHelper.php # components/com_content/Model/Article.php
As discussed in #16952, this pr convertes the code which is calling
JError::raise*in core. Next step would then be to remove the JError class.Pinging @mbabker and @wilsonge for feedback.