2
0
mirror of https://github.com/42wim/matterbridge synced 2024-11-19 03:25:33 +00:00
matterbridge/vendor/github.com/d5/tengo/v2/stdlib/errors.go
2020-01-09 21:52:19 +01:00

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()}}
}