from Devshed
You might not know this, but PHP comes with a full-featured error handling API, which provides you with a number of options when it comes to trapping and resolving errors. Not only does PHP allow you to decide which types of errors get displayed to the user, but it also allows you to bypass its internal error handler in favour of your own custom functions, thereby opening up all sorts of possibilities for the creative developer.








September 3rd, 2002 at 2:42 am
I usually get the mySQL error 1064 and yes, the SQL is displayed so I can usually figure out the SQL error – BUT, it would be real nice if I could also see the PHP program name and line# of the error.
Besides using an IDE – have you see mysql Classes or PHP coding style that handled this?
September 3rd, 2002 at 9:26 am
here is a general debug class that gives *detailed* error messages:
http://xdebug.derickrethans.nl/
though I\’m not sure if includes MySQL info. There is also Thomas V. Cox\’s tutorial that explains how to get very detailed MySQL errors if you\’re using the PEAR library – but I don\’t think it isolates the line number in the code:
http://vulcanonet.com/soft/?pack=pear_tut#ss5
I\’m using this one at the moment and would recommend it.
September 3rd, 2002 at 8:31 pm
Nice – I was able to compile xdebug on my FreeBSD 4.5 PHP 4.1.1 system without any problems and worked cleanly.
It sure does give you a fair amount of output – albeit GL will complain about the headers. The trace output to a file is nice as well.
It\’s a nice addition to the set of tools.
Blaine