From 0e0950172d5217f42485a2a6712aa64101a1948e Mon Sep 17 00:00:00 2001 From: surdeus Date: Tue, 11 Jun 2024 13:46:20 +0500 Subject: [PATCH] fix: added more info on error in tengo.go. --- tengo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tengo.go b/tengo.go index b2a6acc..037bb06 100644 --- a/tengo.go +++ b/tengo.go @@ -5,6 +5,7 @@ import ( "fmt" "context" "bytes" + "strconv" ) type Script = tengo.Script @@ -162,7 +163,9 @@ func (pp *Tengo) Eval( bts, ok := tengo.ToByteSlice(o) if !ok { return nil, tengo.ErrInvalidArgumentType{ + Name: strconv.Itoa(i), Expected: "string/bytes", + Found: o.TypeName(), } } bt[i] = bts