Page 1 of 1

Error handling

Posted: Mon Dec 06, 2010 11:07 pm
by matt1234
I'm designing a PHP site from scratch and I want to know the best way to handle errors. I put together a function that becomes PHP's new go-to error-handling function but I've run across the idea...what if that function hiccups? How can I print a friendly error message if my error-handling function hiccups?

Re: Error handling

Posted: Tue Dec 07, 2010 2:09 pm
by social_experiment
I'd go with exceptions, check what can cause the functions to fail and throw an exception based on that.