Skip to content

Commit

Permalink
Add doc to explain return value with after clauses (#13783)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikosmond authored Aug 18, 2024
1 parent 07137a1 commit f2f4f3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/elixir/pages/getting-started/try-catch-and-rescue.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ cleaning up!
** (RuntimeError) oops
```

Elixir will automatically wrap the function body in a `try` whenever one of `after`, `rescue` or `catch` is specified.
Elixir will automatically wrap the function body in a `try` whenever one of `after`, `rescue` or `catch` is specified. The `after` block handles side effects and does not change the return value from the clauses above it.

## Else

Expand Down

0 comments on commit f2f4f3a

Please sign in to comment.