Click to See Complete Forum and Search --> : What kind of error tweakery do I need for this?


Stephen Philbin
05-04-2005, 09:25 PM
Hi folks. I'm having a bit of trouble debugging my php when using OOP (php5). The problem is, whenever a method from a class fails because a funtion in the method fails (in this case an invalid argument supplied to mysql_fetch_array) I am always given the line number that the error occurred at in the class, as opposed to the line number in the main file on which the method failed as a whole.

Do I need to be looking into exception throwing and catching or should my attentions be focused more on the custom error handling part of php to get what I need?

SpectreReturns
05-06-2005, 12:01 AM
http://php.net/manual/en/function.set-error-handler.php
http://php.net/manual/en/function.set-exception-handler.php

Those should do it for ya.