At 09:47 26.11.2002, Derick Rethans wrote:
On Tue, 26 Nov 2002, Marcus B�rger wrote:> For example: > php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error %d", error) > would convert to: > php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP-42", error) > > and in the init code we would register these errors: > register_error_message("PHP-42", "Error %d") > > and now translation tables for these error messages are possible. Bloat alert! Do you have any idea how expensive those hash looks ups are? And I would _never_ want to maintain that for any code I write. And how would you handle clashes in here? It's a bad idea. Derick
You pointed me to my failure here :-) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error %d", error) should convert to php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP-42", "Error %d", error) and now loading any external data is optional and registering error messages is no longer needed. And such conversion can easily be done automagically by a sed script. Some people already accepted bundeled cdb as a good message storage. This would require 2 or 3 file lookups per message. And again you shouldn't have one single error message in setups where time is money. In those scenarios you are expected to have *no* error. marcus -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php
