the question is, what do I do with set_error_handler and trigger_error so when there is an error they will show where is the error in the program itself instead of the function library?
[man]set_error_handler[/man] this is how you use that function
see those examples submitted in comments a bit down might give you a clue
This is a tutorial at Zend.com they have good tutorials To mention is a series of tutorial for Beginners
http://www.zend.com/zend/tut/tutorial-eckhouse.php?article=tutorial-eckhouse&kind=t&id=2503&open=1
Good Beginners Tutorials at zend.com
.