Cross language exception (#10023)

This commit is contained in:
fyrestone
2020-08-26 10:46:05 +08:00
committed by GitHub
parent 1e99b814f0
commit 08adbb371f
30 changed files with 441 additions and 137 deletions
@@ -83,6 +83,35 @@ def py_func_pass_python_actor_handle():
return ray.get(r)
@ray.remote
def py_func_python_raise_exception():
1 / 0
@ray.remote
def py_func_java_throw_exception():
f = ray.java_function("io.ray.test.CrossLanguageInvocationTest",
"throwException")
r = f.remote()
return ray.get(r)
@ray.remote
def py_func_nest_python_raise_exception():
f = ray.java_function("io.ray.test.CrossLanguageInvocationTest",
"raisePythonException")
r = f.remote()
return ray.get(r)
@ray.remote
def py_func_nest_java_throw_exception():
f = ray.java_function("io.ray.test.CrossLanguageInvocationTest",
"throwJavaException")
r = f.remote()
return ray.get(r)
@ray.remote
class Counter(object):
def __init__(self, value):