From: Julius Tuskenis <julius@nsoft.lt>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: translating exception messages of postgresql functions
Date: Wed, 14 May 2008 18:22:24 +0300
Message-ID: <482B03B0.8060206@nsoft.lt> (raw)
In-Reply-To: <20080514144627.GD5521@alvh.no-ip.org>
References: <482AF7F7.5090309@nsoft.lt>
<20080514144627.GD5521@alvh.no-ip.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: julius@nsoft.lt, alvherre@commandprompt.com
Subject: Re: translating exception messages of postgresql functions
In-Reply-To: <482B03B0.8060206@nsoft.lt>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox