Page 1 of 1

PEAR_Errors aren´t send to the declared function ...

Posted: Mon Jun 02, 2003 3:08 pm
by Dummkopf
Hi,

I called

Code: Select all

<?php
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array(&$this, 'addElement'));
?>
in order to let all PEAR_Error-Objects be handled by the function 'addElement' of the instantiated class 'ErrorContainer'.

But if I raise some errors (just by typing raiseError(...) in some of my classes), none of them are added to my Container. It seems as if they weren´t given to my function, because I can add them successfully by hand with

Code: Select all

<?php
$ErrorContainer->addElement(PEAR::raiseError('Error-Objekt'));
?>
So what did I make wrong ??