Skip to content

Commit 16580ad

Browse files
committed
[GR-23233] Set context of internal exceptions to cause
PullRequest: graalpython/1056
2 parents 0989a36 + eb16e01 commit 16580ad

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)