fix: added more info on error in tengo.go.
This commit is contained in:
parent
b4079fbc33
commit
0e0950172d
1 changed files with 3 additions and 0 deletions
3
tengo.go
3
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
|
||||
|
|
Loading…
Reference in a new issue