Get rid of "THIS IS BAD" message for Exceptions that don't subclass MaharaException
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Low
|
Aaron Wells |
Bug Description
Since 2006, Mahara's exception handler has displayed this message if it handles an exception that is not a subclass of MaharaException:
[WAR] 1b (lib/errors.
THIS IS BAD and should be changed to something extending MaharaException,
unless the exception is from a third party library.
Original trace follows
This may have been useful in 2006 when MaharaException was new, but since then we have pretty much eliminated cases in the core code where this would be useful, and it pretty much only comes up with false positives where the exception really is from a third-party library.
This message is also displayed if an instance of MaharaException (rather than a subclass of it) is caught. Again, maybe necessary in 2006 when we were supporting PHP4, but with PHP 5 we can just make MaharaException abstract, which will make it impossible to be instantiated directly.
As such, the message is unneccesary and just clutters up logs and adds an extra bit of panic and confusion to admins new to Mahara. So I think it'd be better to remove it, and simply print something like "[External library exception]:"
Changed in mahara: | |
milestone: | none → 16.04.0 |
importance: | Undecided → Low |
status: | New → In Progress |
assignee: | nobody → Aaron Wells (u-aaronw) |
Changed in mahara: | |
milestone: | 16.04.0 → 16.10.0 |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/6019