pgsql: Improve exception usage in PL/Python - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Improve exception usage in PL/Python
Date
Msg-id E1PiEtR-00038g-Oh@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Improve exception usage in PL/Python

Use the built-in TypeError, not SPIError, for errors having to do with
argument counts or types.  Use SPIError, not simply plpy.Error, for
errors in PLy_spi_execute_plan.  Finally, do not set a Python
exception if PyArg_ParseTuple failed, as it already sets the correct
exception.

Jan Urbański

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=582b5ac62e74a553e72151b321804a7b2e5fed6f

Modified Files
--------------
src/pl/plpython/expected/plpython_unicode_2.out |    2 +-
src/pl/plpython/expected/plpython_unicode_3.out |    2 +-
src/pl/plpython/plpython.c                      |   12 ++++--------
3 files changed, 6 insertions(+), 10 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: autoreconf
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Do not prefix error messages with the string "PL/Python: "