5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-10 11:00:27 +00:00
matterbridge/vendor/github.com/d5/tengo/stdlib/errors.go

12 lines
214 B
Go
Raw Normal View History

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