Stanislav Malyshev wrote:
>> to use die() or some other method of terminating execution.  A user
>> calling class_exists() clearly expects a return from autoload, whereas a
>> user instantiating an object will expect a fatal error if the class
>> cannot be found.
>
> This is true, but __autoload should never do it, the engine should do
> it. So I think it's better just not make autoloader *ever* produce
> errors. Can't find it - just give up, if engine really needs it it'd
> bail out :)
Another possibility: could there be a way to add context information (a
string) to the error message the engine displays?  This would alleviate
my concern.
>> This is useful for PEAR2 as a means of displaying helpful information on
>> locating missing class files only in cases where a fatal error would
>> result anyways.
>
> Well, autoloader might print debug traces etc. if the developer wants
> it, but I don't see why this should be unique feature for class_exists.

the point is that if the user is using class_exists() they don't want
extra output on missing class.

Greg

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to