Error reporting is one of the more difficult things about PHP. For beginners, the errors seem vague and, often times, misleading. Line numbers are shown where no errors exist, and, since PHP isn't a compiled language, it's not going to get much better in the foreseeable future. That's why user's need to take matters into their own hands and grab those errors themselves, and DevShed is here ot help.
In their latest article, Building A Generic Error Reporting Class In PHP (nice short title), they show you how to create a nice class that will allow you to spit back errors more like "Error on page, notifiying admin. Please go back." rather than "Parse Error: Line 12, missing or incorrect ']'". Which do you think a user would more like to see?
The library of functions that they help you develop is a generic error class, so you can adapt it to whatever you might need for your site once you complete it. They even capture different kinds of errors, based on their severity, and choose what to do with they accordingly.




