Skip to content

Commit eb16e01

Browse files
committed
Set context of internal exceptions to cause
1 parent f8f91e3 commit eb16e01

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*graalpython.lib-python.3.test.test_generator_stop.TestPEP479.test_stopiteration_wrapping
2+
*graalpython.lib-python.3.test.test_generator_stop.TestPEP479.test_stopiteration_wrapping_context

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/PRaiseNode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ PException doBuiltinTypeWithCause(PythonBuiltinClassType type, PBaseException ca
180180
@Shared("factory") @Cached PythonObjectFactory factory) {
181181
assert format != null;
182182
PBaseException baseException = factory.createBaseException(type, format, arguments);
183+
baseException.setContext(cause);
183184
baseException.setCause(cause);
184185
throw raise(baseException);
185186
}

0 commit comments

Comments
 (0)