|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2017, 2019, Oracle and/or its affiliates. |
| 2 | + * Copyright (c) 2017, 2020, Oracle and/or its affiliates. |
3 | 3 | * Copyright (c) 2014, Regents of the University of California
|
4 | 4 | *
|
5 | 5 | * All rights reserved.
|
|
39 | 39 | import com.oracle.graal.python.builtins.PythonBuiltins;
|
40 | 40 | import com.oracle.graal.python.builtins.objects.PNone;
|
41 | 41 | import com.oracle.graal.python.builtins.objects.frame.PFrame;
|
| 42 | +import com.oracle.graal.python.builtins.objects.function.PArguments; |
42 | 43 | import com.oracle.graal.python.nodes.frame.MaterializeFrameNode;
|
43 | 44 | import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
|
44 | 45 | import com.oracle.graal.python.nodes.function.PythonBuiltinNode;
|
@@ -108,8 +109,8 @@ public static PTraceback createTracebackChain(PException exception, MaterializeF
|
108 | 109 | // frames may have not been requested
|
109 | 110 | if (frame != null) {
|
110 | 111 | Node location = element.getLocation();
|
111 |
| - // only include frames of non-builtin functions |
112 |
| - if (location != null && !location.getRootNode().isInternal()) { |
| 112 | + // only include frames of non-builtin python functions |
| 113 | + if (PArguments.isPythonFrame(frame) && location != null && !location.getRootNode().isInternal()) { |
113 | 114 | // create the PFrame and refresh frame values
|
114 | 115 | PFrame escapedFrame = materializeNode.execute(null, location, false, true, frame);
|
115 | 116 | cur = factory.createTraceback(escapedFrame, exception);
|
|
0 commit comments