From: Tom Lane <tgl@sss.pgh.pa.us>
To: jacobcrell@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16405: Exception P0004 not caught in EXCEPTION WHEN OTHERS
Date: Thu, 30 Apr 2020 13:04:25 -0400
Message-ID: <6966.1588266265@sss.pgh.pa.us> (raw)
In-Reply-To: <16405-b2ea8017cd288002@postgresql.org>
References: <16405-b2ea8017cd288002@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> Excepted Behavior: P0004 exception is caught in EXCEPTION WHEN OTHERS,
> function returns text 'Hit the Other exception block'.
> Actual Behavior: P0004 exception is raised and remains uncaught.
That's intentional, per the documentation [1]:
The special condition name OTHERS matches every error type except
QUERY_CANCELED and ASSERT_FAILURE. (It is possible, but often unwise,
to trap those two error types by name.)
regards, tom lane
[1] https://www.postgresql.org/docs/current/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, jacobcrell@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16405: Exception P0004 not caught in EXCEPTION WHEN OTHERS
In-Reply-To: <6966.1588266265@sss.pgh.pa.us>
* 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