File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ with plpy.subtransaction():
134
134
except plpy.SPIError, e:
135
135
if not swallow:
136
136
raise
137
- plpy.notice("Swallowed %r " % e )
137
+ plpy.notice("Swallowed %s(%r) " % (e.__class__.__name__, e.args[0]) )
138
138
return "ok"
139
139
$$ LANGUAGE plpythonu;
140
140
SELECT subtransaction_nested_test();
@@ -153,7 +153,7 @@ SELECT * FROM subtransaction_tbl;
153
153
154
154
TRUNCATE subtransaction_tbl;
155
155
SELECT subtransaction_nested_test('t');
156
- NOTICE: Swallowed SyntaxError('syntax error at or near "error"', )
156
+ NOTICE: Swallowed SyntaxError('syntax error at or near "error"')
157
157
subtransaction_nested_test
158
158
----------------------------
159
159
ok
@@ -178,7 +178,7 @@ with plpy.subtransaction():
178
178
return "ok"
179
179
$$ LANGUAGE plpythonu;
180
180
SELECT subtransaction_deeply_nested_test();
181
- NOTICE: Swallowed SyntaxError('syntax error at or near "error"', )
181
+ NOTICE: Swallowed SyntaxError('syntax error at or near "error"')
182
182
subtransaction_deeply_nested_test
183
183
-----------------------------------
184
184
ok
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ with plpy.subtransaction():
128
128
except plpy.SPIError, e:
129
129
if not swallow:
130
130
raise
131
- plpy.notice("Swallowed %r " % e )
131
+ plpy.notice("Swallowed %s(%r) " % (e.__class__.__name__, e.args[0]) )
132
132
return "ok"
133
133
$$ LANGUAGE plpythonu;
134
134
ERROR: could not compile PL/Python function "subtransaction_nested_test"
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ with plpy.subtransaction():
128
128
except plpy.SPIError, e:
129
129
if not swallow:
130
130
raise
131
- plpy.notice("Swallowed %r " % e )
131
+ plpy.notice("Swallowed %s(%r) " % (e.__class__.__name__, e.args[0]) )
132
132
return "ok"
133
133
$$ LANGUAGE plpythonu;
134
134
ERROR: could not compile PL/Python function "subtransaction_nested_test"
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ with plpy.subtransaction():
80
80
except plpy .SPIError , e:
81
81
if not swallow:
82
82
raise
83
- plpy .notice (" Swallowed %r " % e )
83
+ plpy .notice (" Swallowed %s(%r) " % ( e . __class__ .__name__, e . args [ 0 ]) )
84
84
return " ok"
85
85
$$ LANGUAGE plpythonu;
86
86
You can’t perform that action at this time.
0 commit comments