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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dummkopf
Forum Newbie
Posts: 21
Joined: Sat May 24, 2003 1:54 pm

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

Post 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 ??
Post Reply