Re: Re: __autoload() enhancement

From: Date: Mon, 04 Apr 2005 13:47:22 +0000
Subject: Re: Re: __autoload() enhancement
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-15791@lists.php.net to get a copy of this message
GB>>3. If a library has an obscure bug in __autoload, the only error message GB>>the user will see is: GB>> GB>>"undefined class XXXX" GB>> GB>>If __autoload() is going to gain the ability to be defined for a GB>>library, then the error messages must be enhanced as well. Shouldn't that bug result in some error message by itself? If it doesn't, there's probably nothing to add to "undefined class" anyway. GB>>1) document that coders of __autoload() should throw an GB>>autoload_exception if a class is not found Why just not return false or something? Exception is supposed to be used when things are so bad you just can not continue. But I don't think class not being found is such situation for autoload. On the other hand, I think that multiple autoload functions should be evaluated in isoplated way - so that exception, etc. in one of them would terminate it, but not the whole autoload process (i.e., next one would be run). -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115

« previous php.internals (#15791) next »