Re: PEAR_DelegateOwner

From: Date: Sun, 16 Nov 2003 18:38:26 +0000
Subject: Re: PEAR_DelegateOwner
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23678@lists.php.net to get a copy of this message
<mj@php.net> wrote : > On Sat Nov 15, 2003 at 05:2528PM -0500, LingWitt@insightbb.com wrote: >>>> Usually we do use PEAR::raiseError() / $this->raiseError() for that. >>>> Did >>>> I miss something? >>> >>> For methods that don't exist, I'm calling trigger_error so that it is >>> more in line with undefined methods treated by PHP. >>> For the others, I will use the PEAR scheme. >> >> This was premature. I only use PEAR's raiseError. >> >> Is the following error reporting to aggressive? > > Well, usually PEAR code should not die(), but leave the decision to the > programmer. However in this situation die()'ing looks reasonably for > me. Would be cool to hear some other opinions. Your code is not delegation IMO :) The principle is to call the method if it is implemented in the delegate. If it is not, well, so be it, don't call it. There is no need to raise an error or whatever. Am I wrong ? Bertrand Mansion Mamasam

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