We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86e78c1 commit 7e7f441Copy full SHA for 7e7f441
pkg/state/encode.go
@@ -802,14 +802,19 @@ func (es *encodeState) Save(obj reflect.Value) {
802
})
803
for _, id := range ids {
804
// Encode the id.
805
+ oes = nil
806
wire.Save(&es.w, wire.Uint(id))
807
// Marshal the object.
- oes := es.pending[id]
808
+ oes = es.pending[id]
809
wire.Save(&es.w, oes.encoded)
810
}
811
}); err != nil {
- // Include the object and the error.
812
- Failf("error serializing object %#v: %w", oes.encoded, err)
+ if oes != nil {
813
+ // Include the object and the error.
814
+ Failf("error serializing object %#v: %w", oes.encoded, err)
815
+ } else {
816
+ Failf("error serializing type or ID: %w", err)
817
+ }
818
819
820
0 commit comments