Re: [PHP-I18N] intl 1.0.3: Trying to understand the internal error functions
[email protected] (Stanislav Malyshev) Mon, 21 Dec 2009 13:07:09 -0800
| Newsgroups | php.i18n |
|---|---|
| Organization | Zend Technologies |
| Message-ID | <[email protected]> |
Hi! > In order to "synchronize" global and individual errors, there are three > functions (plural of error): > intl_errors_reset > intl_errors_set_custom_msg > intl_errors_set_code > > However, the first and the third are NEVER referenced. The second is > only used in connection with intl_error_set_code (note singular error!) > > All this seems not to add up. Are there any docs available somewhere? OK, so there is two places where errors are kept - global error state and local error state for each object. When error happens, if we have an object we set both objects' state and global state, when we don't have object, only global state. Plural functions set both object's state and global state. Singular functions set only one state, specified by err, which is global if err is NULL. -- Stanislav Malyshev, Zend Software Architect [email protected] http://www.zend.com/ (408)253-8829 MSN: [email protected]