View Issue Details

IDProjectCategoryView StatusLast Update
0004426Composrcorepublic2020-10-10 18:16
ReporterChris GrahamAssigned To 
SeverityFeature-request 
Status non-assignedResolutionopen 
Product Version 
Fixed in Version 
Summary0004426: Consistent exception handling (on hold)
DescriptionPHP has a hodge-podge of errors, exceptions, functions to find recent errors (e.g. json_last_error), and error return values (e.g. false for strpos).

Composr (v11+) handles errors in a configurable way. You can make them fatal, or attach warnings, or log them.

But we don't do it with exceptions, we do it more around the PHP error framework (trigger_error), or our own exit screens.
We do make it so if code wants exceptions instead of errors it can. Sometimes this is needed, e.g. if you want something to run in a sandbox and never exit.

PHP has made it possible to throw exceptions from error handlers for a long time. i.e. we can unify errors and exceptions.

It would be nice to only deal with exceptions, and then build our configurability on top of that.

Honestly though, it may be best to not really shake the boat until PHP makes a move to unifying things. Why go out of our way to be consistent when PHP itself is not, so code will be messy in any event?
Therefore I'm keeping this here on hold until PHP does something about it's messiness.
TagsNo tags attached.
Time estimation (hours)32
Sponsorship open

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-10-10 18:16 Chris Graham New Issue