Skip to content

Commit ba48dc8

Browse files
Merge pull request #385 from bgribaudo/exceptions-to-errors
Power Query: Changing exception -> error
2 parents 8050d53 + e2d040b commit ba48dc8

15 files changed

Lines changed: 15 additions & 15 deletions

query-languages/m/custom-date-and-time-format-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ There are two ways to indicate that characters are to be interpreted as literal
12281228

12291229
### Using single custom format specifiers
12301230

1231-
A custom date and time format string consists of two or more characters. Date and time formatting methods interpret any single-character string as a standard date and time format string. If they don't recognize the character as a valid format specifier, they throw an expression error. For example, a format string that consists only of the specifier "h" is interpreted as a standard date and time format string. However, in this particular case, an exception is thrown because there is no "h" standard date and time format specifier.
1231+
A custom date and time format string consists of two or more characters. Date and time formatting methods interpret any single-character string as a standard date and time format string. If they don't recognize the character as a valid format specifier, they raise an error. For example, a format string that consists only of the specifier "h" is interpreted as a standard date and time format string. However, in this particular case, an error is raised because there is no "h" standard date and time format specifier.
12321232

12331233
To use any of the custom date and time format specifiers as the only specifier in a format string (that is, to use the "d", "f", "F", "g", "h", "H", "K", "m", "M", "s", "t", "y", "z", ":", or "/" custom format specifier by itself), include a space before or after the specifier, or include a percent ("%") format specifier before the single custom date and time specifier.
12341234

query-languages/m/datetimezone-switchzone.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ DateTimeZone.SwitchZone(
1818

1919
## About
2020

21-
Changes timezone information to on the datetimezone value `dateTimeZone` to the new timezone information provided by `timezoneHours` and optionally `timezoneMinutes`. If `dateTimeZone` does not have a timezone component, an exception is thrown.
21+
Changes timezone information to on the datetimezone value `dateTimeZone` to the new timezone information provided by `timezoneHours` and optionally `timezoneMinutes`. If `dateTimeZone` does not have a timezone component, an error is raised.
2222

2323
## Example 1
2424

query-languages/m/list-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ These functions create and manipulate list values.
3636
|[List.Positions](list-positions.md)|Returns a list of offsets for the input.|
3737
|[List.Range](list-range.md)|Returns a subset of the list beginning at an offset.|
3838
|[List.Select](list-select.md)|Returns a list of values that match the condition.|
39-
|[List.Single](list-single.md)|Returns the one list item for a list of length one, otherwise throws an exception.|
39+
|[List.Single](list-single.md)|Returns the one list item for a list of length one, otherwise raises an error.|
4040
|[List.SingleOrDefault](list-singleordefault.md)|Returns the one list item for a list of length one and the default value for an empty list.|
4141
|[List.Skip](list-skip.md)|Returns a list that skips the specified number of elements at the beginning of the list.|
4242

query-languages/m/list-mode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ List.Mode(<b>list</b> as list, optional <b>equationCriteria</b> as any) as any
1414

1515
## About
1616

17-
Returns the item that appears most frequently in `list`. If the list is empty an exception is thrown. If multiple items appear with the same maximum frequency, the last one is chosen. An optional comparison criteria value, `equationCriteria`, can be specified to control equality testing.
17+
Returns the item that appears most frequently in `list`. If the list is empty an error is raised. If multiple items appear with the same maximum frequency, the last one is chosen. An optional comparison criteria value, `equationCriteria`, can be specified to control equality testing.
1818

1919
## Example 1
2020

query-languages/m/list-modes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ List.Modes(<b>list</b> as list, optional <b>equationCriteria</b> as any) as list
1414

1515
## About
1616

17-
Returns the items that appear most frequently in `list`. If the list is empty an exception is thrown. If multiple items appear with the same maximum frequency, all of them are returned. An optional comparison criteria value, `equationCriteria`, can be specified to control equality testing.
17+
Returns the items that appear most frequently in `list`. If the list is empty an error is raised. If multiple items appear with the same maximum frequency, all of them are returned. An optional comparison criteria value, `equationCriteria`, can be specified to control equality testing.
1818

1919
## Example 1
2020

query-languages/m/list-single.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ List.Single(<b>list</b> as list) as any
1414

1515
## About
1616

17-
If there is only one item in the list `list`, returns that item. If there is more than one item or the list is empty, the function throws an exception.
17+
If there is only one item in the list `list`, returns that item. If there is more than one item or the list is empty, the function raises an error.
1818

1919
## Example 1
2020

query-languages/m/list-standarddeviation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ List.StandardDeviation(<b>numbersList</b> as list) as nullable number
1414

1515
## About
1616

17-
Returns a sample based estimate of the standard deviation of the values in the list, `numbersList`. If `numbersList` is a list of numbers, a number is returned. An exception is thrown on an empty list or a list of items that is not type `number`.
17+
Returns a sample based estimate of the standard deviation of the values in the list, `numbersList`. If `numbersList` is a list of numbers, a number is returned. An error is raised on an empty list or a list of items that is not type `number`.
1818

1919
## Example 1
2020

query-languages/m/logical-fromtext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Logical.FromText(<b>text</b> as nullable text) as nullable logical
1414

1515
## About
1616

17-
Creates a logical value from the text value `text`, either "true" or "false". If `text` contains a different string, an exception is thrown. The text value `text` is case insensitive.
17+
Creates a logical value from the text value `text`, either "true" or "false". If `text` contains a different string, an error is raised. The text value `text` is case insensitive.
1818

1919
## Example 1
2020

query-languages/m/logical-totext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Logical.ToText(<b>logicalValue</b> as nullable logical) as nullable text
1414

1515
## About
1616

17-
Creates a text value from the logical value `logicalValue`, either `true` or `false`. If `logicalValue` is not a logical value, an exception is thrown.
17+
Creates a text value from the logical value `logicalValue`, either `true` or `false`. If `logicalValue` is not a logical value, an error is raised.
1818

1919
## Example 1
2020

query-languages/m/record-field.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Record.Field(<b>record</b> as record, <b>field</b> as text) as any
1414

1515
## About
1616

17-
Returns the value of the specified `field` in the `record`. If the field is not found, an exception is thrown.
17+
Returns the value of the specified `field` in the `record`. If the field is not found, an error is raised.
1818

1919
## Example 1
2020

0 commit comments

Comments
 (0)