matterbridge/vendor/github.com/d5/tengo/v2/stdlib/errors.go

13 lines
205 B
Go
Raw Normal View History

2020-01-09 20:52:19 +00:00
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()}}
}