From 06eea1bec833764da4eebafbb8ea5377e8358659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lozier?= Date: Sat, 15 Feb 2020 16:32:22 -0500 Subject: [PATCH] Don't remove traceback on rethrow --- Src/IronPython/Runtime/Operations/PythonOps.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Src/IronPython/Runtime/Operations/PythonOps.cs b/Src/IronPython/Runtime/Operations/PythonOps.cs index be08d5ceb..cfd8de62d 100644 --- a/Src/IronPython/Runtime/Operations/PythonOps.cs +++ b/Src/IronPython/Runtime/Operations/PythonOps.cs @@ -2351,10 +2351,7 @@ public static PythonTuple GetExceptionInfo(CodeContext/*!*/ context) { public static Exception MakeRethrownException(CodeContext/*!*/ context) { PythonTuple t = GetExceptionInfo(context); Debug.Assert(t[1] == GetRawContextException()); - Exception e = MakeExceptionWorker(context, t[0], t[1], t[2], null, suppressContext: false, forRethrow: true); - e.RemoveTraceBack(); - ExceptionHelpers.UpdateForRethrow(e); - return e; + return MakeExceptionWorker(context, t[0], t[1], t[2], null, suppressContext: false, forRethrow: true); } public static Exception MakeException(CodeContext/*!*/ context, object exception) {