Skip to content

Commit aacf794

Browse files
committed
Hide location of internal exceptions
1 parent b37a27c commit aacf794

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/statement/ExceptionHandlingStatementNode.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ protected boolean shouldCatchAllExceptions() {
189189

190190
private PException wrapJavaException(Throwable e) {
191191
PException pe = PException.fromObject(getBaseException(e), this);
192+
pe.setHideLocation(true);
192193
// Re-attach truffle stacktrace
193194
moveTruffleStackTrace(e, pe);
194195
return pe;
@@ -206,6 +207,7 @@ protected PException wrapJavaExceptionIfApplicable(Throwable e) {
206207

207208
public static PException createRecursionError(Throwable e, PythonObjectFactory factory, Node location) {
208209
PException pe = PException.fromObject(factory.createBaseException(RecursionError, "maximum recursion depth exceeded", new Object[]{}), location);
210+
pe.setHideLocation(true);
209211
moveTruffleStackTrace(e, pe);
210212
return pe;
211213
}

0 commit comments

Comments
 (0)