Skip to content

Commit 17c8baf

Browse files
authored
Link to defexception in Exception doc and mention the behaviour (#13533)
1 parent d5eb65b commit 17c8baf

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

lib/elixir/lib/exception.ex

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
defmodule Exception do
22
@moduledoc """
3-
Functions to format throw/catch/exit and exceptions.
3+
Functions for dealing with throw/catch/exit and exceptions.
44
5-
Note that stacktraces in Elixir are only available inside
6-
catch and rescue by using the `__STACKTRACE__/0` variable.
5+
This module also defines the behaviour required by custom
6+
exceptions. To define your own, see `defexception/1`.
77
8-
Do not rely on the particular format returned by the `format*`
8+
## Formatting functions
9+
10+
Several functions in this module help format exceptions.
11+
Some of these functions expect the stacktrace as argument.
12+
The stacktrace is typically available inside catch and
13+
rescue by using the `__STACKTRACE__/0` variable.
14+
15+
Do not rely on the particular format returned by the
916
functions in this module. They may be changed in future releases
1017
in order to better suit Elixir's tool chain. In other words,
1118
by using the functions in this module it is guaranteed you will

0 commit comments

Comments
 (0)