Skip to content

Commit 707f015

Browse files
committed
update
1 parent 4ace058 commit 707f015

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

articles/azure-resource-manager/bicep/bicep-functions-flow-control.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ Namespace: [sys](bicep-functions.md#namespaces-for-functions).
3131
The following example shows how to use `fail`.
3232

3333
```bicep
34-
anObjectParameter.?name ?? anObjectParameter.?id ?? fail('Expected anObjectParameter to have either a .name or a .id property');
34+
anObjectParameter.?name ?? anObjectParameter.?id ?? fail('Expected anObjectParameter to have either a .name or a .id property')
3535
```
3636

3737
Here, the coalesce operator (??) ensures that if **.name** exists, execution stops immediately. If **.name** is null or undefined, **.id** is checked. If both are missing, `fail` is triggered, preventing further execution.
3838

3939
```bicep
40-
x != 0 ? y / x : fail('x cannot be zero because it will be used as a divisor');
40+
x != 0 ? y / x : fail('x cannot be zero because it will be used as a divisor')
4141
```
4242

4343
In this case, the ternary operator (? :) checks if **x** is nonzero before performing division. If **x** is 0, `fail` is invoked, stopping execution before an invalid operation occurs.

articles/azure-resource-manager/bicep/bicep-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The following functions are available for loading the content from external file
9191

9292
The following function is available for influencing execution flow. This function is in the `sys` namespace:
9393

94-
* [fail](bicep-functions-flow-controlmd#fail)
94+
* [fail](bicep-functions-flow-control.md#fail)
9595

9696
## Lambda functions
9797

0 commit comments

Comments
 (0)