We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f26d477 commit 17e5b46Copy full SHA for 17e5b46
core/workflow/callable/call.go
@@ -25,6 +25,7 @@
25
package callable
26
27
import (
28
+ "errors"
29
"fmt"
30
"sort"
31
"strconv"
@@ -221,6 +222,12 @@ func (c *Call) Call() error {
221
222
if len(returnVar) > 0 {
223
c.parentRole.SetRuntimeVar(returnVar, output)
224
}
225
+
226
+ // if __call_error was written into the VarStack we treat it as an error exit from the call
227
+ if errMsg, ok := c.VarStack["__call_error"]; ok && len(errMsg) > 0 {
228
+ return errors.New(errMsg)
229
+ }
230
231
return nil
232
233
@@ -236,6 +243,7 @@ func (c *Call) Start() {
236
243
237
244
238
245
func (c *Call) Await() error {
246
+ log.Trace("awaiting " + c.Func + " in trigger phase " + c.Traits.Await)
239
247
return <-c.await
240
248
241
249
0 commit comments