Skip to content

Commit 0ad923c

Browse files
committed
Reset exception state when initializing context.
1 parent 0a5dd6d commit 0ad923c

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/control/TopLevelExceptionHandler.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ public Object execute(VirtualFrame frame) {
117117
}
118118
}
119119
throw e;
120-
} finally {
121-
context.setCurrentException(null);
122120
}
123121
}
124122
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ public void initialize() {
191191
mainModule = core.factory().createPythonModule(__MAIN__);
192192
mainModule.setAttribute(__BUILTINS__, builtinsModule);
193193
sysModules.setItem(__MAIN__, mainModule);
194+
currentException = null;
194195

195196
isInitialized = true;
196197
}

0 commit comments

Comments
 (0)