User tests: Successful: Unsuccessful:
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.
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
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_content Libraries |
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
|