While advancing with MDL-69936 a good number of ideas about moodle exceptions, how they are reported... came on the table.
This issue has been created to keep all them together and, if a project to work on exceptions comes to happen, can be changed to be a proper Epic, fixing and improving anything related with exceptions.
Following, there are the main points and thoughts that were commented along the linked issue. All them should be considered if work starts here:
- Need to create any type of new exceptions hierarchy, or is it ok with current one.
- Contenxt-aware exception display for UI, rendering the rest of the page, or standalone error message, only linking to main page.
- Analyse if we can have a bunch of generic translated messages so, instead of using a different string for each case, we only use a standard message ("file problem detected", "inconsistency found"... ) together with a more specific error code.
- Differences between UI and CLI
- Differences between running under prod mode or dev mode.
- When to show the language identifiers (errorcode) and when the translations (UI/CLI/Logs).
- Allow the use of "literals" (plain English phrases) as errorcode (instead of string identifiers).
- Verify if all current uses (80% aprox of total uses), that are right now translated strings, are correctly translated or we can reduce them because they are only to be shown to devs or caught.
Of course, more points can come any time, please keep them numbered for easier reference.
- has been marked as being related by
-
MDL-69936 Decide what to do with print_error() + lang strings on moodle_exception
-
- Closed
-