# [EMAIL PROTECTED] / 2002-11-24 15:39:23 +0100:
> On Sun, 24 Nov 2002, Roman Neuhauser wrote:
> > # [EMAIL PROTECTED] / 2002-11-12 13:08:33 +0100:
> > > On Tue, 2002-11-12 at 07:54, Derick Rethans wrote:
> > > > And that's why I would be -1 on the first one. However, the whole
> > > > error reporting is a pretty mess, with some extensions implementing
> > > > other 'philosiphies' then others. Getting this all nice and clean is
> > > > another point we should address in PHP 5 (just like Stig mentioned).
> > >
> > > I did not mention that here, but I would like to go through the PHP
> > > source and introduce Unix-style (EPERM etc.) error codes in all calls
> > > to php_error().  But that's not a topic for this mailing list.
> >
> >     "Call to nonexistent function" -> ENOTIMPL? :)
> 
>     Nope, ENOSYS would be appropiate for that.
> 
>     #define ENOSYS      38  /* Function not implemented */

    Sorry, my mistake. Anyway, I *really* like the idea.
    I guess it could speed some stuff up. Consider:

    do {
        if (!file_exists($file)) { $code = ENOENT; break; }
        if (!is_readable($file)) { $code = EACCES; break; }
        ...
    }

    switch ($code = fopen($file, 'r')) {
        case ENOENT:
            ...
        case EACCES:
            ...
    }

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.    see http://www.eyrie.org./~eagle/faqs/questions.html

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

Reply via email to