Re: expect()/popExpect()
| From: | Greg Beaver | Date: | Fri, 01 Oct 2004 17:44:36 +0000 |
| Subject: | Re: expect()/popExpect() | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33599@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
Greg Beaver wrote:PEAR_ErrorStack has no PEAR_Error integration beyond the ability to return a PEAR_Error. What this means, however, is that an error that is not pushed will not generate a PEAR_Error, so you can simulate expectError() through this mechanism, if you're using compatibility mode. GregLukas Smith wrote:Hmm .. but how if at all does that integrate with PEAR::setErrorHandling()?Hi, I am still extending PEAR in MDB2 for one reason: I need expect() and popExpect() error. Now I heared that using ErrorStack I could get this functionality somehow? But I dont quite see how that would work and looking at the ErrorStack API I dont see what I should do.ErrorStack relies on callbacks to do this. You simply return PEAR_ERRORSTACK_IGNORE for errors that should be skipped, and one of the other constants to push/log or both. This way, you can filter errors in the callback.