Commit 582b5ac
committed
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ński1 parent 418df3a commit 582b5ac
File tree
3 files changed
+6
-10
lines changed- src/pl/plpython
- expected
3 files changed
+6
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2820 | 2820 | | |
2821 | 2821 | | |
2822 | 2822 | | |
2823 | | - | |
2824 | | - | |
2825 | | - | |
2826 | 2823 | | |
2827 | | - | |
2828 | 2824 | | |
2829 | 2825 | | |
2830 | 2826 | | |
2831 | | - | |
| 2827 | + | |
2832 | 2828 | | |
2833 | 2829 | | |
2834 | 2830 | | |
| |||
2984 | 2980 | | |
2985 | 2981 | | |
2986 | 2982 | | |
2987 | | - | |
| 2983 | + | |
2988 | 2984 | | |
2989 | 2985 | | |
2990 | 2986 | | |
| |||
3002 | 2998 | | |
3003 | 2999 | | |
3004 | 3000 | | |
3005 | | - | |
| 3001 | + | |
3006 | 3002 | | |
3007 | 3003 | | |
3008 | 3004 | | |
| |||
3089 | 3085 | | |
3090 | 3086 | | |
3091 | 3087 | | |
3092 | | - | |
| 3088 | + | |
3093 | 3089 | | |
3094 | 3090 | | |
3095 | 3091 | | |
| |||
0 commit comments