engine: Improve error messages for ambiguity

This appears twice, make each one unique.
This commit is contained in:
James Shubin
2023-11-12 17:09:21 -05:00
parent e38f3cc12c
commit 9a1a81925e
2 changed files with 2 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ func (obj *Engine) SendRecv(res engine.RecvableRes) (map[string]bool, error) {
// i think we probably want the same kind, at least for now...
if kind1 != kind2 {
e := fmt.Errorf("kind mismatch between %s: %s and %s: %s", v.Res, kind1, res, kind2)
e := fmt.Errorf("send/recv kind mismatch between %s: %s and %s: %s", v.Res, kind1, res, kind2)
err = errwrap.Append(err, e) // list of errors
continue
}

View File

@@ -193,7 +193,7 @@ func StructFieldCompat(st1 interface{}, key1 string, st2 interface{}, key2 strin
}
if kind1 != kind2 {
return fmt.Errorf("kind mismatch between %s and %s", kind1, kind2)
return fmt.Errorf("field kind mismatch between %s and %s", kind1, kind2)
}
if t1, t2 := value1.Type(), value2.Type(); t1 != t2 {