From 338ee1e4586da5b7fb456c03865479f44256b6fb Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 7 Oct 2014 10:50:35 -0400 Subject: [PATCH] Add additional debugging output on mistyped conversion --- pkg/conversion/converter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/conversion/converter.go b/pkg/conversion/converter.go index f61433910a3..1ad27e196ac 100644 --- a/pkg/conversion/converter.go +++ b/pkg/conversion/converter.go @@ -253,7 +253,7 @@ func (c *Converter) convert(sv, dv reflect.Value, scope *scope) error { } if !scope.flags.IsSet(AllowDifferentFieldTypeNames) && c.NameFunc(dt) != c.NameFunc(st) { - return fmt.Errorf("Can't convert %v to %v because type names don't match.", st, dt) + return fmt.Errorf("Can't convert %v to %v because type names don't match (%v, %v).", st, dt, c.NameFunc(st), c.NameFunc(dt)) } // This should handle all simple types.