? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
4 Feb 2017

Summary of Changes

The base Exception class really shouldn't be thrown, it's too generic and gets caught by too many try/catch blocks. Good practice is to use more specialized exceptions.

In JComponentHelper::renderComponent() an Exception is thrown if the component is missing (either the option parameter is empty, the component is disabled, or the entry point file doesn't exist in the filesystem). I've created a new JComponentExceptionMissing class to represent this error state instead.

Testing Instructions

A request for a non-existing or disabled component should result in a JComponentExceptionMissing object being thrown versus the base level Exception.

Documentation Changes Required

N/A

avatar mbabker mbabker - open - 4 Feb 2017
avatar mbabker mbabker - change - 4 Feb 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Feb 2017
Category Libraries
avatar Thoert
Thoert - comment - 5 Feb 2017

I have tested this item successfully on 267b142

Work as expected.


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

avatar Thoert Thoert - test_item - 5 Feb 2017 - Tested successfully
avatar wilsonge
wilsonge - comment - 5 Feb 2017

I think we should make the default code of the exception should be 404 if it's a component missing

avatar mbabker mbabker - change - 5 Feb 2017
Labels Added: ?
avatar wilsonge wilsonge - change - 5 Feb 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-05 17:38:19
Closed_By wilsonge
avatar wilsonge wilsonge - close - 5 Feb 2017
avatar wilsonge wilsonge - merge - 5 Feb 2017
avatar wilsonge
wilsonge - comment - 5 Feb 2017

Looks good now :)

Add a Comment

Login with GitHub to post a comment