aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src
diff options
context:
space:
mode:
authorJosé Valim <[email protected]>2017-10-12 20:55:52 +0200
committerJosé Valim <[email protected]>2017-10-13 18:22:25 +0200
commit1143c915c4c29f20d6202c3ec10ebbf04a567c5a (patch)
tree539445dc9a7664774e6ee34e699f24f02ac63890 /erts/doc/src
parenta4a1d9cfed28dbff88e9a859417a968510fbf9b8 (diff)
downloadotp-1143c915c4c29f20d6202c3ec10ebbf04a567c5a.tar.gz
otp-1143c915c4c29f20d6202c3ec10ebbf04a567c5a.tar.bz2
otp-1143c915c4c29f20d6202c3ec10ebbf04a567c5a.zip
Document the guarantees provided by get_stacktrace
Diffstat (limited to 'erts/doc/src')
-rw-r--r--erts/doc/src/erlang.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index b40aae5d28..d0588fe3c1 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -2029,6 +2029,18 @@ helper() ->
where the exception occurred or the function was called.
</item>
</taglist>
+ <warning><p>Developers should rely on stacktrace entries only for
+ debugging purposes.</p>
+ <p>The VM performs tail call optimization, which
+ does not add new entries to the stacktrace, and also limits stacktraces
+ to a certain depth. Furthermore, compiler options, optimizations and
+ future changes may add or remove stacktrace entries, causing any code
+ that expects the stacktrace to be in a certain order or contain specific
+ items to fail.</p>
+ <p>The only exception to this rule is <c>error:undef</c> which
+ guarantees to include the <anno>Module</anno>, <anno>Function</anno> and <anno>Arity</anno>
+ of the attempted function as the first stacktrace entry.</p>
+ </warning>
<p>See also
<seealso marker="#error/1"><c>error/1</c></seealso> and
<seealso marker="#error/2"><c>error/2</c></seealso>.</p>