mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-25 20:22:03 -08:00
12 lines
214 B
Go
12 lines
214 B
Go
|
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()}}
|
||
|
}
|