? ? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
12 Dec 2017

Summary of Changes

Generally, I would suggest we should not hardcode class and method names into Exception messages and instead dynamically resolve those at runtime through various available resources (i.e. get_class($this) or __METHOD__. This PR changes Exception messages that do not have language keys to dynamically set these values over hardcoding them. One of the benefits of this, especially with the namespacing efforts, is that the message text doesn't have to be changed as the class is renamed (the right name will always resolve).

As well, some minor improvements are made to a few messages to be more useful in debugging (primarily affects the Feed package).

Testing Instructions

Code review

avatar mbabker mbabker - open - 12 Dec 2017
avatar mbabker mbabker - change - 12 Dec 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Dec 2017
Category Libraries
avatar brianteeman
brianteeman - comment - 12 Dec 2017

Would it be better if these were translatable? Just asking to learn.

avatar mbabker
mbabker - comment - 13 Dec 2017

Generally Exception messages are intended to be developer resources to help with debugging code and should rarely be shown directly to the end user. So for this reason the rule of thumb I would use is no, they shouldn't be translated (especially as translations may lose context of the intended error message). Of course we don't do an adequate level of error handling in the code so a lot of these messages do end up reaching the end user, but that's another discussion.

avatar brianteeman
brianteeman - comment - 13 Dec 2017

Thanks for the explanation

avatar mbabker mbabker - change - 13 Dec 2017
Labels Added: ?
avatar wilsonge wilsonge - test_item - 14 Dec 2017 - Tested successfully
avatar wilsonge
wilsonge - comment - 14 Dec 2017

I have tested this item successfully on aa6592d

Good by me on code review


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19049.

avatar joomdonation joomdonation - test_item - 20 Dec 2017 - Tested successfully
avatar joomdonation
joomdonation - comment - 20 Dec 2017

I have tested this item successfully on aa6592d

Code review


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19049.

avatar franz-wohlkoenig franz-wohlkoenig - change - 20 Dec 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 20 Dec 2017

Ready to Commit after two successful tests.

Thanks for Tests.

avatar mbabker mbabker - change - 21 Dec 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-12-21 00:09:28
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 21 Dec 2017
avatar mbabker mbabker - merge - 21 Dec 2017

Add a Comment

Login with GitHub to post a comment