Reviewed: https://reviews.mahara.org/6019 Committed: https://git.mahara.org/mahara/mahara/commit/287141c71d7682ccf163690b7fde71225b8cbd4f Submitter: Robert Lyon ([email protected]) Branch: master
commit 287141c71d7682ccf163690b7fde71225b8cbd4f Author: Aaron Wells <[email protected]> Date: Fri Feb 5 16:43:53 2016 +1300 Bug 1542126: Cleaning up very old error handler code This patch contains these three related changes: 1. Removes the "THIS IS BAD" message that was printed when 3rd-party exception or an instance of MaharaException was thrown. 2. Removes the completely unnecessary "MaharaThrowable" interface. 3. Adds an comment explaining why MaharaException is not abstract 4. In the case of a smarty exception while printing an error, prints the name and content of the smarty exception. behatnotneeded: Covered by existing tests Change-Id: I800a868bd187efb76ed37cca872ce262c2abbdb0 -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1542126 Title: Get rid of "THIS IS BAD" message for Exceptions that don't subclass MaharaException Status in Mahara: Fix Committed 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.php:457) An exception was thrown of class Exception. 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]:" To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1542126/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

