PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
16 Sep 2024

Summary of Changes

This is an attempt to implement an error handling which is backwards compatible to switch between legacy set/getError and throwing exceptions. Yes, this will mean a lot of code duplication due to setting the flag and when throwing an error, we have to have the code for both methods. The background is, that at some point we have to refactor the code to finally only use exceptions and in order to make this as simple as possible, I want this to be prepare in such a way that we only have to delete the old code and be done with it instead of having to again check each line of code and fixing it the right way. The moment we want to delete all of this, we can check for $obj->setUseExceptions(true) and delete that line and then look for the block with $this->shouldUseExceptions() and delete that.

Testing Instructions

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar Hackwar Hackwar - open - 16 Sep 2024
avatar Hackwar Hackwar - change - 16 Sep 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Sep 2024
Category Administration com_content Libraries
avatar Hackwar Hackwar - change - 17 Sep 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-09-17 10:45:04
Closed_By Hackwar
Labels Added: PR-5.3-dev
avatar Hackwar Hackwar - close - 17 Sep 2024

Add a Comment

Login with GitHub to post a comment