mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-10 19:22:00 -08:00
13 lines
205 B
Go
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()}}
|
||
|
}
|