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
Showing
- src/pl/plpython/expected/plpython_unicode_2.out 1 addition, 1 deletionsrc/pl/plpython/expected/plpython_unicode_2.out
- src/pl/plpython/expected/plpython_unicode_3.out 1 addition, 1 deletionsrc/pl/plpython/expected/plpython_unicode_3.out
- src/pl/plpython/plpython.c 4 additions, 8 deletionssrc/pl/plpython/plpython.c
Loading
Please register or sign in to comment