As previously mentioned, this post deals with Error Reporting. The class itself is pretty simple. You have the main() method that creates the error page and you can also call the error() method from another class to email and store the message.
In both instances the previous and current pages are recorded for diagnosis.
If you take a look at the storeErrorMessage() method, you'll notice how the error message is constructed and stored into the $error variable. The sendErrorToWebmaster() method is then called.
In another file, instantiate the class. Where an error is likely to occur, construct the $error variable and call the error() method i.e. $this->_error_reporting_obj->error($error);
In both instances the previous and current pages are recorded for diagnosis.
If you take a look at the storeErrorMessage() method, you'll notice how the error message is constructed and stored into the $error variable. The sendErrorToWebmaster() method is then called.
In another file, instantiate the class. Where an error is likely to occur, construct the $error variable and call the error() method i.e. $this->_error_reporting_obj->error($error);
Comments
Post a Comment