Interest of PEAR::setErrorHandling?

From: Date: Mon, 30 May 2005 12:10:43 +0000
Subject: Interest of PEAR::setErrorHandling?
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37887@lists.php.net to get a copy of this message
Hi, I have been wondering what is the interest of PEAR::setErrorHandling function. I fear that somebody will answer that the typical use is for example to interrupt script execution if there is an error, or to display it, or to log it as an error... The reasons why I fear that is that my packages handles some errors (which means that other packages, or even my package calls PEAR::raiseError and my package "catch" it). Let me give an example when this may happen: I'm the leader of File_Archive and I'm writing a function that allows appending to an existing archive, or creating an archive if it doesn't already exist. The first thing I do is to call a function that allows appending to an existing archive. If the archive doesn't exist, a PEAR error is raised, and I create the archive. Am I allowed to do that? Can the user decide something went wrong in my code because PEAR::raiseError has been called? Can you give me an example of legitimate use of setErrorHandling? Thanks -- Vincent

« previous php.pear.dev (#37887) next »