@@ -65,7 +65,7 @@ public Function_ERROR(FunctionBase func1) : base(func1)
6565
6666 public override Operand Evaluate ( AlgorithmEngine work , Func < string , Operand > tempParameter )
6767 {
68- var args1 = func1 . Evaluate ( work , tempParameter ) ; if ( args1 . IsNotText ) { args1 = args1 . ToText ( ) ; if ( args1 . IsError ) return args1 ; }
68+ var args1 = func1 . Evaluate ( work , tempParameter ) ; if ( args1 . IsNotText ) { args1 = args1 . ToText ( ) ; if ( args1 . IsError ) return args1 ; }
6969 return Operand . Error ( args1 . TextValue ) ;
7070 }
7171
@@ -136,8 +136,8 @@ public override Operand Evaluate(AlgorithmEngine work, Func<string, Operand> tem
136136 {
137137 var txt = name ;
138138 if ( string . IsNullOrEmpty ( name ) ) {
139- var args1 = func1 . Evaluate ( work , tempParameter ) ; if ( args1 . IsNotText ) { args1 = args1 . ToText ( ) ; if ( args1 . IsError ) return args1 ; }
140- txt = args1 . TextValue ;
139+ var args1 = func1 . Evaluate ( work , tempParameter ) ; if ( args1 . IsNotText ) { args1 = args1 . ToText ( ) ; if ( args1 . IsError ) return args1 ; }
140+ txt = args1 . TextValue ;
141141 } else {
142142 txt = name ;
143143 }
@@ -347,9 +347,9 @@ public Function_JSON(FunctionBase func1) : base(func1)
347347 public override Operand Evaluate ( AlgorithmEngine work , Func < string , Operand > tempParameter )
348348 {
349349 var args1 = func1 . Evaluate ( work , tempParameter ) ;
350- if ( args1 . IsJson ) { return args1 ; }
351- args1 = args1 . ToText ( "Function '{0}' parameter is error!" , "Json" ) ;
352350 if ( args1 . IsError ) { return args1 ; }
351+ if ( args1 . IsJson ) { return args1 ; }
352+ if ( args1 . IsNotText ) { return Operand . Error ( "Function '{0}' parameter is error!" , "Json" ) ; }
353353 var txt = args1 . TextValue ;
354354 if ( ( txt . StartsWith ( '{' ) && txt . EndsWith ( '}' ) ) || ( txt . StartsWith ( '[' ) && txt . EndsWith ( ']' ) ) ) {
355355 try {
0 commit comments