Hi PHP Programmers,
Anyone, please post your opinions regarding, what is the best approach to handle errors? I will post mine first,
I use PDO as the database handler, whenever an error occurs I call my custom made method which will implode the errorInfo() output in a nice way with current page’s URL and timestamp and display the output, this output is also sent the admin’s email address, finally, just after the output I have used exit() so nothing is displayed.
What are your opinions regarding the above approach?
Many Thanks and happy posting opinions :)