Re: translating exception messages of postgresql functions

From: Julius Tuskenis <julius(at)nsoft(dot)lt>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: translating exception messages of postgresql functions
Date: 2008-05-14 15:22:24
Message-ID: 482B03B0.8060206@nsoft.lt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Alvaro Herrera rašė:
> Julius Tuskenis wrote:
>
>> Hello,
>>
>> I'd like to ask how is translation of raised exceptions done in
>> postgresql applications?
>>
>
> You want it translated or not translated?
>
I want to translate the exception message. For example I raise an
exception in pg function like RAISE EXCEPTION 'my exception', then in my
application that calls the function I catch the exception. But before I
show it to the user of application I have to translate it. How do I know
what exception it is? As Tom Lane answered - the only way is to rely on
message text.

--
Julius Tuskenis
Programavimo skyriaus vadovas
UAB nSoft
mob. +37068233050

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alvaro Herrera 2008-05-14 15:33:37 Re: translating exception messages of postgresql functions
Previous Message Tom Lane 2008-05-14 15:01:36 Re: translating exception messages of postgresql functions