File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/statement Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -141,10 +141,7 @@ public void executeVoid(VirtualFrame frame) {
141
141
if (shouldCatchAll ) {
142
142
PException pe = PException .fromObject (getBaseException (e ), this );
143
143
// Re-attach truffle stacktrace
144
- pe .initCause (e .getCause ());
145
- // Host exceptions have their stacktrace already filled in, call this to set
146
- // the cutoff point to the catch site
147
- pe .getTruffleStackTrace ();
144
+ moveTruffleStacktTrace (e , pe );
148
145
boolean handled = catchException (frame , pe );
149
146
if (handled ) {
150
147
return ;
@@ -157,6 +154,14 @@ public void executeVoid(VirtualFrame frame) {
157
154
orelse .executeVoid (frame );
158
155
}
159
156
157
+ @ TruffleBoundary
158
+ private static void moveTruffleStacktTrace (Throwable e , PException pe ) {
159
+ pe .initCause (e .getCause ());
160
+ // Host exceptions have their stacktrace already filled in, call this to set
161
+ // the cutoff point to the catch site
162
+ pe .getTruffleStackTrace ();
163
+ }
164
+
160
165
@ TruffleBoundary
161
166
private PBaseException getBaseException (Throwable e ) {
162
167
return factory ().createBaseException (PythonErrorType .ValueError , "%m" , new Object []{e });
You can’t perform that action at this time.
0 commit comments