> >     -1 on errno-style error codes.  They are not versatile
> >     enough or easy to manage.
>
> They are a lot more versatile and manageable than having to use
> substring/regexp matching on human-readable text.
>
> What I'm going for here is a way for scripts to detect _why_ fopen fails,
> other than checking the error message.  If we do get localized error
> messages at one point, this is even more important.  Do you have any other
> suggestions?

    In order to succeed over a long period of time, error tokens
    need to be versatile enough to satisfy this set of
    requirements.

    - the conflict potential should be low
      (can conflicts between independently released modules be
      avoided and if yes, how)

    - they should be easily recognizable by humans and automatons
      (so that e.g. bugs.php.net can easily insert the English
      error message for any given error code)

    - management overhead should be as low as possible
      (do we need a central registry and to what extent)

    Could you explain how you think that errno-style codes
    achieve these tasks?

    - Sascha

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

Reply via email to