greenplum-db/plcontainer

ERROR nested error not work as expected

BaiShaoqi opened this issue · 2 comments

Expected behavior

ERROR:  plpy.Error: boom (plpython.c:4960)
CONTEXT:  Traceback (most recent call last):
  PL/Python function "nested_error", line 11, in <module>
    fun3()
  PL/Python function "nested_error", line 9, in fun3
    fun2()
  PL/Python function "nested_error", line 5, in fun2
    fun1()
  PL/Python function "nested_error", line 2, in fun1
    plpy.error("boom")
PL/Python function "nested_error"

Actual behavior

ERROR: boom

Step to reproduce the behavior

CREATE FUNCTION nested_error() RETURNS text AS $$
# container: plc_python_shared
def fun1():
    plpy.error("boom")

def fun2():
    fun1()

def fun3():
    fun2()

fun3()

return "not reached"
$$ LANGUAGE plcontainer;

SELECT nested_error();

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

This is dup to #411
Closed