Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait userErrorAdviceTrait
- {
- public function userErrorAdvice()
- {
- $error = error_get_last();
- $_SESSION['errorStore'] = $error;
- $errorMessage = "No file exists for the PageController";
- if (strstr($error['message'], "No file exists for the PageController class"))
- {
- header('Location: http://192.171.127./~louis/errorAdvicePage.php?errorType=NoPageControllerError');
- exit;
- }
- }
- public function setUserErrorAdvice()
- {
- set_error_handler("userErrorAdvice");
- }
- }
- use userErrorAdviceTrait;
- public static function makePageController($pageName)
- {
- //self::shutDownFunction();
- //self::shutdown_function();
- self::setUserErrorAdvice();
- //Rest of code ....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement