Skip to content

Commit 094f2cd

Browse files
committed
no need to log json version of the change. caller already gives detail in error handling
1 parent 8b2ec1a commit 094f2cd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

common/sourcecontrol.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package common
22

33
import (
4-
"encoding/json"
54
"errors"
65
"fmt"
76
"gopkg.in/src-d/go-git.v4"
@@ -143,8 +142,7 @@ func GetChangeContent(change *object.Change) (result string, contentError error)
143142
//temporary response to: https://github.com/sergi/go-diff/issues/89
144143
defer func() {
145144
if err := recover(); err != nil {
146-
changeJson, _ := json.Marshal(change)
147-
contentError = errors.New(fmt.Sprintf("Panic occurred while retrieving change content: %s\n\n %s", err, changeJson))
145+
contentError = errors.New(fmt.Sprintf("Panic occurred while retrieving change content: %s", err))
148146
}
149147
}()
150148
patch, err := change.Patch()

0 commit comments

Comments
 (0)