Skip to content

Commit

Permalink
Add original error log to panic error message
Browse files Browse the repository at this point in the history
  • Loading branch information
grantr committed Mar 28, 2019
1 parent 58bd70a commit 55079ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/client/fake/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func NewFakeClientWithScheme(clientScheme *runtime.Scheme, initObjs ...runtime.O
for _, obj := range initObjs {
err := tracker.Add(obj)
if err != nil {
panic(err)
panic(fmt.Errorf("failed to add object %v to fake client: %v", obj, err))
}
}
return &fakeClient{
Expand Down

0 comments on commit 55079ce

Please sign in to comment.