blob: a2942bb02ee3b35fbe16d7c2f776867645a550a7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
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()}}
}
|