From 9a1a81925e348591fa58bb3086a165317ce10b36 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Sun, 12 Nov 2023 17:09:21 -0500 Subject: [PATCH] engine: Improve error messages for ambiguity This appears twice, make each one unique. --- engine/graph/sendrecv.go | 2 +- engine/util/util.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/graph/sendrecv.go b/engine/graph/sendrecv.go index 6ef11f1b..56e2c735 100644 --- a/engine/graph/sendrecv.go +++ b/engine/graph/sendrecv.go @@ -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 } diff --git a/engine/util/util.go b/engine/util/util.go index f38c66b9..1e8a71ac 100644 --- a/engine/util/util.go +++ b/engine/util/util.go @@ -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 {