2019-01-18 12:43:46 +03:00
|
|
|
package stdlib
|
2019-01-18 03:52:30 +03:00
|
|
|
|
|
|
|
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()}}
|
|
|
|
}
|