Skip to content

Commit 5d4c747

Browse files
committed
PyException_SetTraceback
1 parent 01eeead commit 5d4c747

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

graalpython/com.oracle.graal.python.cext/src/exceptions.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,12 @@ void initialize_exceptions() {
109109
PyExc_BufferError = PY_EXCEPTION("BufferError");
110110
}
111111

112+
113+
int PyException_SetTraceback(PyObject *self, PyObject *tb) {
114+
PyObject* result = UPCALL_O(native_to_java(self), "with_traceback", native_to_java(tb));
115+
if (result == ERROR_MARKER) {
116+
return -1;
117+
} else {
118+
return 0;
119+
}
120+
}

0 commit comments

Comments
 (0)