Parcourir la source

opt(graph): return better error message

Signed-off-by: Jiyong Huang <huangjy@emqx.io>
Jiyong Huang il y a 2 ans
Parent
commit
2280f8f9b7
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      internal/topo/planner/planner_graph.go

+ 1 - 1
internal/topo/planner/planner_graph.go

@@ -527,7 +527,7 @@ func parseFunc(props map[string]interface{}) (*operator.FuncOp, error) {
 	c, ok := f.Expr.(*ast.Call)
 	if !ok {
 		// never happen
-		return nil, fmt.Errorf("expr %v is not ast.Call", stmt.Fields[0].Expr)
+		return nil, fmt.Errorf("expr %s is not ast.Call", funcExpr)
 	}
 	var name string
 	if f.AName != "" {