File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,9 @@ invalidArrayArg = "First argument must be an array"
331331description = " Joins the elements of an array into a single string, separated using a delimiter."
332332invoked = " join function"
333333invalidArrayArg = " First argument must be an array"
334+ invalidNullElement = " Array elements cannot be null"
335+ invalidArrayElement = " Array elements cannot be arrays"
336+ invalidObjectElement = " Array elements cannot be objects"
334337
335338[functions .lastIndexOf ]
336339description = " Returns the index of the last occurrence of an item in an array"
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ fn stringify_value(v: &Value) -> Result<String, DscError> {
1616 Value :: String ( s) => Ok ( s. clone ( ) ) ,
1717 Value :: Number ( n) => Ok ( n. to_string ( ) ) ,
1818 Value :: Bool ( b) => Ok ( b. to_string ( ) ) ,
19- Value :: Null => Err ( DscError :: Parser ( "Array elements cannot be null" . to_string ( ) ) ) ,
20- Value :: Array ( _) => Err ( DscError :: Parser ( "Array elements cannot be arrays" . to_string ( ) ) ) ,
21- Value :: Object ( _) => Err ( DscError :: Parser ( "Array elements cannot be objects" . to_string ( ) ) ) ,
19+ Value :: Null => Err ( DscError :: Parser ( t ! ( "functions.join.invalidNullElement" ) . to_string ( ) ) ) ,
20+ Value :: Array ( _) => Err ( DscError :: Parser ( t ! ( "functions.join.invalidArrayElement" ) . to_string ( ) ) ) ,
21+ Value :: Object ( _) => Err ( DscError :: Parser ( t ! ( "functions.join.invalidObjectElement" ) . to_string ( ) ) ) ,
2222 }
2323}
2424
You can’t perform that action at this time.
0 commit comments