Improve error handling
Export the timeout kill error and use error instead of string in result struct.
This commit is contained in:
parent
fe9ca5ffcc
commit
8ccf842518
4 changed files with 18 additions and 23 deletions
|
|
@ -84,7 +84,7 @@ func setupGremlin(env *otto.Otto, ses *Session) {
|
|||
graph.Set("Emit", func(call otto.FunctionCall) otto.Value {
|
||||
value := call.Argument(0)
|
||||
if value.IsDefined() {
|
||||
ses.SendResult(&GremlinResult{metaresult: false, err: "", val: &value, actualResults: nil})
|
||||
ses.SendResult(&GremlinResult{metaresult: false, err: nil, val: &value, actualResults: nil})
|
||||
}
|
||||
return otto.NullValue()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue