?
avatar PhilETaylor
PhilETaylor
11 Oct 2020

Steps to reproduce the issue

Code review.

Here:

throw new Exception\ResourceNotFound(Text::_('JLIB_APPLICATION_ERROR_RECORD'), 404);

And here:

throw new Exception\ResourceNotFound(Text::_('JLIB_APPLICATION_ERROR_RECORD'), 404);

We have an Exception of Exception\ResourceNotFound being thrown in the namespace Joomla\Component\Contenthistory\Api\Controller

Neither phpStorm or I can work our where this missing Joomla\Component\Contenthistory\Api\Controller\Exception\ResourceNotFound class is, or if its a mistake, what class should be used as the thrown exception.

avatar PhilETaylor PhilETaylor - open - 11 Oct 2020
avatar joomla-cms-bot joomla-cms-bot - change - 11 Oct 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Oct 2020
avatar SharkyKZ
SharkyKZ - comment - 11 Oct 2020

It should be Joomla\CMS\MVC\Controller\Exception\ResourceNotFound.

avatar wilsonge
wilsonge - comment - 12 Oct 2020

What @SharkyKZ said - I guess someone copy/pasted from the parent ApiController class

avatar PhilETaylor
PhilETaylor - comment - 12 Oct 2020

I've not had time to revisit this myself - but clearly it needs changing to be correct

avatar PhilETaylor PhilETaylor - close - 13 Oct 2020
avatar PhilETaylor
PhilETaylor - comment - 13 Oct 2020
avatar PhilETaylor PhilETaylor - change - 13 Oct 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-10-13 12:14:11
Closed_By PhilETaylor

Add a Comment

Login with GitHub to post a comment