summaryrefslogtreecommitdiff
path: root/docs-src
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2024-06-16 15:16:54 -0400
committerGitHub <noreply@github.com>2024-06-16 19:16:54 +0000
commitc275254c45353aeadf6adf85858856d0c36d624f (patch)
treee64ac9cef3f839fc7a38077bc98e26115a3803b5 /docs-src
parenta33f6d9fe0f145afdd06ef5b3431e3c2fe281c16 (diff)
chore(api)!: Error instead of returning 0 on invalid inputs to conv.* functions (#2104)
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'docs-src')
-rw-r--r--docs-src/content/functions/conv.yml18
1 files changed, 14 insertions, 4 deletions
diff --git a/docs-src/content/functions/conv.yml b/docs-src/content/functions/conv.yml
index f0073247..237af8e5 100644
--- a/docs-src/content/functions/conv.yml
+++ b/docs-src/content/functions/conv.yml
@@ -301,8 +301,9 @@ funcs:
This function attempts to convert most types of input (strings, numbers,
and booleans), but behaviour when the input can not be converted is
- undefined and subject to change. Unconvertable inputs may result in
- errors, or `0` or `-1`.
+ undefined and subject to change.
+
+ Unconvertable inputs will result in errors.
Floating-point numbers (with decimal points) are truncated.
arguments:
@@ -327,6 +328,8 @@ funcs:
platforms, but is useful when input to another function must be provided
as an `int`.
+ Unconvertable inputs will result in errors.
+
On 32-bit systems, given a number that is too large to fit in an `int`,
the result is `-1`. This is done to protect against
[CWE-190](https://cwe.mitre.org/data/definitions/190.html) and
@@ -352,6 +355,8 @@ funcs:
description: |
Converts the inputs to an array of `int64`s.
+ Unconvertable inputs will result in errors.
+
This delegates to [`conv.ToInt64`](#conv-toint64) for each input argument.
arguments:
- name: in...
@@ -366,6 +371,8 @@ funcs:
description: |
Converts the inputs to an array of `int`s.
+ Unconvertable inputs will result in errors.
+
This delegates to [`conv.ToInt`](#conv-toint) for each input argument.
arguments:
- name: in...
@@ -382,8 +389,9 @@ funcs:
This function attempts to convert most types of input (strings, numbers,
and booleans), but behaviour when the input can not be converted is
- undefined and subject to change. Unconvertable inputs may result in
- errors, or `0` or `-1`.
+ undefined and subject to change.
+
+ Unconvertable inputs will result in errors.
arguments:
- name: in
required: true
@@ -399,6 +407,8 @@ funcs:
description: |
Converts the inputs to an array of `float64`s.
+ Unconvertable inputs will result in errors.
+
This delegates to [`conv.ToFloat64`](#conv-tofloat64) for each input argument.
arguments:
- name: in...