Skip to content

Commit 0a5dd6d

Browse files
committed
Do not convert foreign exceptions.
1 parent 8dee1ab commit 0a5dd6d

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/foreign/TruffleObjectBuiltins.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
import static com.oracle.graal.python.nodes.SpecialMethodNames.__TRUEDIV__;
5454
import static com.oracle.graal.python.runtime.exception.PythonErrorType.AttributeError;
5555
import static com.oracle.graal.python.runtime.exception.PythonErrorType.MemoryError;
56-
import static com.oracle.graal.python.runtime.exception.PythonErrorType.RuntimeError;
5756

5857
import java.util.Arrays;
5958
import java.util.List;
@@ -810,9 +809,6 @@ protected Object doInteropCall(TruffleObject callee, Object[] arguments, @Suppre
810809
}
811810
} catch (ArityException | UnsupportedTypeException | UnsupportedMessageException e) {
812811
throw raise(PythonErrorType.TypeError, "invalid invocation of foreign callable %s()", callee);
813-
} catch (RuntimeException e) {
814-
// wrap any other runtime exception into a PException
815-
throw raise(RuntimeError, "unexpected exception occurred when calling foreign object %s: %s", callee, e);
816812
}
817813
}
818814

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/PythonCallNode.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
*/
2626
package com.oracle.graal.python.nodes.call;
2727

28-
import static com.oracle.graal.python.runtime.exception.PythonErrorType.RuntimeError;
29-
3028
import com.oracle.graal.python.builtins.objects.function.PKeyword;
3129
import com.oracle.graal.python.nodes.BuiltinNames;
3230
import com.oracle.graal.python.nodes.PNode;
@@ -141,9 +139,6 @@ Object call(ForeignInvoke callable, Object[] arguments, PKeyword[] keywords,
141139
// the interop contract is to revert to READ and then EXECUTE
142140
Object member = getAttrNode.executeObject(callable.receiver, callable.identifier);
143141
return callNode.execute(member, arguments, keywords);
144-
} catch (RuntimeException e) {
145-
// convert any other runtime exception to Python RuntimeError
146-
throw raise(RuntimeError, "unexpected exception occurred when calling foreign object %s: %s", callable, e);
147142
}
148143
}
149144

0 commit comments

Comments
 (0)