Skip to content

Commit 2981ee9

Browse files
corona10ncw
authored andcommitted
py: Fix TracebackDump not to dump duplicated exception type
1 parent b715616 commit 2981ee9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Diff for: py/exception.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,7 @@ func (exc *ExceptionInfo) TracebackDump(w io.Writer) {
158158
}
159159
fmt.Fprintf(w, "Traceback (most recent call last):\n")
160160
exc.Traceback.TracebackDump(w)
161-
name := "<nil>"
162-
if exc.Type != nil {
163-
name = exc.Type.Name
164-
}
165-
fmt.Fprintf(w, "%v: %v\n", name, exc.Value)
161+
fmt.Fprintf(w, "%v\n", exc.Value)
166162
}
167163

168164
// Test for being set

0 commit comments

Comments
 (0)