summaryrefslogtreecommitdiff
path: root/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_exit_1_func.txt
blob: 481fd9f793cf47155cf41a42b38bdcf1277f7fcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

  -spec exit(Reason) -> no_return() when Reason :: term().

  Raises an exception of class exit with exit reason Reason. As
  evaluating this function causes an exception to be raised, it has
  no return value.

  The intent of the exception class exit is that the current
  process should be stopped (for example when a message telling a
  process to stop is received).

  This function differ from error/1,2,3 by causing an exception of
  a different class and by having a reason that does not include the
  list of functions from the call stack.

  See the guide about errors and error handling for additional
  information.

  Example:

    > exit(foobar).
    ** exception exit: foobar
    > catch exit(foobar).
    {'EXIT',foobar}

  Note:
    If a process calls exit(kill) and does not catch the
    exception, it will terminate with exit reason kill and also
    emit exit signals with exit reason kill (not killed) to
    all linked processes. Such exit signals with exit reason kill
    can be trapped by the linked processes. Note that this means
    that signals with exit reason kill behave differently
    depending on how they are sent because the signal will be
    untrappable if a process sends such a signal to another
    process with erlang:exit/2.