Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
error outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
the729 committed Dec 8, 2019
1 parent 24b0ee5 commit 5c35bbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (d *Decoder) decodeInterface(rv reflect.Value, enumVariants map[int32]refle
}
tpl, ok := enumVariants[typeVal]
if !ok {
return errors.New("enum variants not defined for value")
return fmt.Errorf("enum variant value %d unknown for interface: %s", typeVal, rv.Type())
}
if tpl.Kind() == reflect.Ptr {
rv1 := reflect.New(tpl.Elem())
Expand Down

0 comments on commit 5c35bbf

Please sign in to comment.