Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23bfe69

Browse files
committed
Fix incorrect documentation
`error` is an undefined function and raises a `CompileError`. Use `raise` instead
1 parent c5e7800 commit 23bfe69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

getting-started/basic-operators.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ iex> 1 and true
4545
`or` and `and` are short-circuit operators. They only execute the right side if the left side is not enough to determine the result:
4646

4747
```iex
48-
iex> false and error("This error will never be raised")
48+
iex> false and raise("This error will never be raised")
4949
false
5050
51-
iex> true or error("This error will never be raised")
51+
iex> true or raise("This error will never be raised")
5252
true
5353
```
5454

0 commit comments

Comments
 (0)