Re: Catching internal error ID's to throw custom errors. - Mailing list pgsql-general

From Richard Huxton
Subject Re: Catching internal error ID's to throw custom errors.
Date
Msg-id 421C5F81.5060206@archonet.com
Whole thread Raw
In response to Catching internal error ID's to throw custom errors. Is it possib le in PostGreSQL?  (Stefan.Ardeleanu@siveco.ro)
List pgsql-general
Stefan.Ardeleanu@siveco.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

pgsql-general by date:

Previous
From: Stefan.Ardeleanu@siveco.ro
Date:
Subject: Catching internal error ID's to throw custom errors. Is it possib le in PostGreSQL?
Next
From: "Andre Schnoor"
Date:
Subject: Re: Help with a very newbie question...