pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: gherzig@fmed.uba.ar
To: pgsql-sql@postgresql.org
Subject: calling EXECUTE on any exception
Date: Fri, 29 Jul 2005 10:36:52 -0300 (ART)
Message-ID: <35926.157.92.152.53.1122644212.squirrel@webmail.fmed.uba.ar> (raw)

Hi all: I want to call some FUNCTION , let say
exception_hanler(Exception_code) for any exception in plsql functions. I
give some pseudo code to explain myself better:

CREATE FUNCION something(...) returns ...
AS
'
...

EXCEPTION
  WHEN OTHER THEN
    EXECUTE exception_handler(Exception_code)
...
'

and let exception_handler() function make all the work and returns some
value for mi program...Now, the actual question...how do i get that
error_code (or code_name, whatever i can get) generated in the something()
function to be proccesed by the exception_handler() function?

Im talking of 8.0 plsql language by the way.

Thanks in advance!
-- 
Gerardo Herzig
Direccion General de Organizacion y Sistemas
Facultad de Medicina

U.B.A.



view thread (3+ messages)  latest in thread

Message-ID: <35926.157.92.152.53.1122644212.squirrel@webmail.fmed.uba.ar>
Permalink:  ../35926.157.92.152.53.1122644212.squirrel@webmail.fmed.uba.ar/
Also on:    postgresql.org/message-id/35926.157.92.152.53.1122644212.squirrel@webmail.fmed.uba.ar

 · 

reply

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-sql@postgresql.org
  Cc: gherzig@fmed.uba.ar
  Subject: Re: calling EXECUTE on any exception
  In-Reply-To: <35926.157.92.152.53.1122644212.squirrel@webmail.fmed.uba.ar>

* 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