-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.2
-
MOODLE_402_STABLE
In Moodle we heavily over-use and abuse exceptions. We use them correctly in many cases, but we also do things like fetching a course record at the top of course/view.php and throwing an exception if it was not found.
Quite frankly, this is rubbish. It's a terrible user experience, it's a meaningless and horrible error message, and it fills server logs with scary looking exception notices for things which, whilst a fatal error, are usually a problem with an old link for a deleted activity/course/etc. For example:
https://moodle.org/course/view.php?id=3
Similarly, throwing an exception for a missing required param with a meaningless message is also unhelpful, for example:
https://moodle.org/help.php
We need to do better!
- will be (partly) resolved by
-
MDL-81503 Improve the section error page when the ID is not correct
- Closed