angelsonearth Posted August 10, 2012 Share Posted August 10, 2012 Hello friends! Please kindly note that I am having problems understanding the function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) in the configuration file because I never seem to encounter it being called in the e-commerce paypal site design. I just noticed, in a second read, that it has the following code apply: set_error_handler('my_error_handler'); Please kindly forgive my lack of foresight, but what are the implications of the function my_error_handler being attached to the custom function set_error_handler for handling errors. For instance, how would it be invoked in the code later on? and what exactly is a custom function for handling errors. Please kindly clarify? Thank you so very much to everyone and anyone who provides some sort of clarification. Bless you all! Link to comment Share on other sites More sharing options...
Larry Posted August 10, 2012 Share Posted August 10, 2012 The my_error_handler() function, once set in PHP (aka, registered), will be invoked whenever an error occurs. You would want to use it to handle errors more gracefully than the default way PHP reports errors. This might mean formatting errors in a style that works with your site, or taking other steps, such as emailing and logging errors. 1 Link to comment Share on other sites More sharing options...
angelsonearth Posted August 10, 2012 Author Share Posted August 10, 2012 Thank you very much, Larry,for the conscientious and helpful reply--and all of the excellent learning tools! Have a great day! Link to comment Share on other sites More sharing options...
Recommended Posts