You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
matterbridge/vendor/github.com/d5/tengo/v2/stdlib/errors.go

13 lines
205 B
Go

package stdlib
import (
"github.com/d5/tengo/v2"
)
func wrapError(err error) tengo.Object {
if err == nil {
return tengo.TrueValue
}
return &tengo.Error{Value: &tengo.String{Value: err.Error()}}
}