-
-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
enhancementNon-breaking improvements to existing behaviourNon-breaking improvements to existing behaviourquestionUsage questions or clarification requestsUsage questions or clarification requests
Milestone
Description
On Logic classes, an error function can be called like the go and do functions, when an error occurs. This can allow the developer to decide how to display the error to the user, rather than a PHP error being shown.
Error functions can be optional in the Logic class, as if none is defined, WebEngine will look at other Logic classes, such as Dynamic pages, and throw them in there instead, finally by simply returning the white screen of death.
The order of error functions:
- The current Logic object
- The dynamic Logic object that's currently executing
- _common.php Logic objects, from most-nested to least-nested
- _error.php special logic object.
In _error.php, the go function can do any logging that is required, and the error function can be called as usual, but the setView() function can be used to hook up different error HTML views for different types of error (403, 404, 500, etc).
Metadata
Metadata
Assignees
Labels
enhancementNon-breaking improvements to existing behaviourNon-breaking improvements to existing behaviourquestionUsage questions or clarification requestsUsage questions or clarification requests