Feature Wiki
Tabs
Improved Error Handling
1 Requirements
The SIG Refactoring, esp. Richard Klees, made a suggestion for an improved error handling in ILIAS, see this document.
- Introduction of Whoops as exception handler
- Remove PEAR error handlers
2 Additional Information
- Concept: Richard Klees, Concepts and Training
- Funding: not needed
- Maintainer: not applicable
- Implementation of the feature is done by Richard Klees, CaT
- Test cases by: tbd
3 Discussion
Jour Fixe, March 16, 2015: We highly appreciate the Richard's suggestion for an improved error handling and schedule it for 5.1.
Kunkel, Matthias [mkunkel], July 23, 2015: There is a similar feature request called Error handling and logging. Do we still need that page - or is it a redundant request?
Klees, Richard [rklees], July 04th, 2016 - We suggest an usability improvement for the error handling that would also allow production instances to benefit from the new error handling.
Jour Fixe, JUL 04, 2016: We discussed the suggestion made by Richard Klees and Florian Wiegand above and scheduled this request for 5.2 with the following requirements:
- We like to have a unique error ID in the error message which should also appear in the error log report to identify each error easily.
- The message text should not have appealing character. We prefer more a text like: "If you want to add information to this error, please contact ..." incl. the error number in the subject of the mail.
- Default error logging should stay as it is (no additional information, esp. not about post variables).
- Concerning error specific files we need a switch to enable the creation of error specific files. A simple mechanism to delete outdated error files should be implemented.
4 Implementation
The Whoops error handler is implemented as suggested. It will only be used in the DEVMODE, that is when DEVMODE = "1" in the client.ini.php. The previous error behaviour of ILIAS (redirect to error.php, show a message) is preserved when the DEVMODE is deactivated.
The Whoops error handler shows the trace of the error including the surrounding code an environment variables. It is meant as a tool for Developers to trace down bugs more easily.
There are different error handlers that could be switched via system/ERROR_HANDLER in client.ini.php:
- PRETTY_PAGE (also default): The handler shown in the screenshot above.
- PLAIN_TEXT: A handler containing the same information as PRETTY_PAGE, but rendered as plain text.
- TESTING: A handler for testing, the same as PLAIN_TEXT, but with some advice for testers above.
Test Cases
Kunkel, Matthias [mkunkel], August 28, 2015: No need for test cases in Testrail as this is a development feature which is only working in DEVMODE. Nevertheless, I set the metadata to "Available in Testrail" to get the feature listed correctly.
Approval
Approved at August 28, 2015 by Kunkel, Matthias [mkunkel]
Last edited: 4. Jul 2016, 15:56, Kunkel, Matthias [mkunkel]