Exceptions checking

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Sep 12 08:01:38 CDT 2008


On 9/12/08 3:02 PM, "Ivan Smahin" <ivan_smahin at paradigmasoft.com> wrote:

>> Look what we need to do is have error.xml files for all our interface
>> languages (for the moment three)
>> So I need to have in case of an exception inside my procedure THAT
>> ENDS THE PROCEDURE (let's say a duplicate in a unique) I would like to
>> return to PHP the errorcode
>> Then PHP can decide based on the clients language wat error message
>> will be displayed (english, dutch or french).
> 
>> Therefore I think we need our 3 edited (for language) own copies of
>> error.xml  inside our language specific directories.
> 
>> So when php calls a stored procedure I can have a fallback like this
> 
>> EXCEPTION
>>         WHEN OTHERS THEN
>>                 return @@LastErrorCode
>> END;
> 
>> Then php can pick up the errorcode and proces for the appropriate
>> language.
> 
>> Will this work ?
> 
> Yes, it should work.
> 
> Generally speaking we can do something like this:
> (It's only my vision)
> 
> 1. There are 3 sources of states - sql_errors.xml, kernel_errors.xml,
> userdefined_errors.xml
> 
> 2. userdefined_errors.xml consist of single <GROUP name="User-defined
> errors">  element. SQLSTATEs could be in 0x50000 - 0x59999 range
> 
> 3. It could be English, German and so on clones placed in
> vResources/English, vResources/German ...
> 
> 4. We use connection property "Language" to determine which language
> is preferable for the current user (Default is English). And prepare
> the message using appropriate xml clone.
> 
> What do you think?

Yes, this idea is our dream

    VRecources/English/*.xml
    VRecources/German/*.xml

Third party developer must be able translate xml files self, put them into
additional folder, and setup own language.

I think name of language should be the same as name of folder,
    so in SQL will sounds like

        SET PROPERTY Language OF CONNECTION TO 'German'

And engine must search for folder with such name and load XMLs from there.


This feature not works yet. Request via Mantis if needed.

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list