Re: Catching internal error ID's to throw custom errors.

From: Richard Huxton <dev(at)archonet(dot)com>
To: Stefan(dot)Ardeleanu(at)siveco(dot)ro
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Catching internal error ID's to throw custom errors.
Date: 2005-02-23 10:48:33
Message-ID: 421C5F81.5060206@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stefan(dot)Ardeleanu(at)siveco(dot)ro wrote:
> I have a lot of plpgsql functions and I would like to catch the original
> postgresql error and, based on that value, to throw with a raise or
> something my custom error.

The section "Trapping Errors" in the plpgsql chapter of the manuals
covers this. Does this not do what you want?

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andre Schnoor 2005-02-23 11:14:36 Re: Help with a very newbie question...
Previous Message Stefan.Ardeleanu 2005-02-23 10:24:53 Catching internal error ID's to throw custom errors. Is it possib le in PostGreSQL?