php-i18n Digest 22 Dec 2009 23:42:31 -0000 Issue 432
Topics (messages 1337 through 1340):
intl 1.0.3: Trying to understand the internal error functions
1337 by: Hans-Peter Oeri
1338 by: Stanislav Malyshev
Re: PATCH intl 1.0.3 normalizer: intl_error_reset gets called twice
1339 by: Stanislav Malyshev
intl / resourcebundle: Invitation to comment
1340 by: Hans-Peter Oeri
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Hi!
intl_error.h defines common error handling functions and "global"
variables - in addition to those in the respective objects.
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?
HPO
--- End Message ---
--- Begin Message ---
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]
--- End Message ---
--- Begin Message ---
Hi!
Going through intl/normalizer I found that intl_error_reset gets called
twice - once in a macro, once explicitely.
You are right, committed the fix.
--
Stanislav Malyshev, Zend Software Architect
[email protected] http://www.zend.com/
(408)253-8829 MSN: [email protected]
--- End Message ---
--- Begin Message ---
Hi!
After helpful feedback from Stanislav I tried to implement libicu's
ResourceBundle - meaning a class/functions to read them.
You can find current developments incl. a diff to intl 1.0.3 at
https://saintcyr.oeri.ch/trac/php-intl
Please dont hesitate to comment or suggest improvements
HPO
--- End Message ---