View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004426 | Composr | core | public | 2020-10-10 18:16 | 2020-10-10 18:16 |
| Reporter | Chris Graham | Assigned To | |||
| Severity | Feature-request | ||||
| Status | non-assigned | Resolution | open | ||
| Product Version | |||||
| Fixed in Version | |||||
| Summary | 0004426: Consistent exception handling (on hold) | ||||
| Description | PHP 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. | ||||
| Tags | No tags attached. | ||||
| Time estimation (hours) | 32 | ||||
| Sponsorship open | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2020-10-10 18:16 | Chris Graham | New Issue |