aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-10-16 15:04:09 +0200
committerGitHub <[email protected]>2017-10-16 15:04:09 +0200
commit081a300d27d3b0d0cd21b7b095cfb9056591a6f2 (patch)
tree80bae16eccce255a347bb53e85ee9eb674133976 /erts
parent41765cc89a82fd28159b492c2156b6418e6dd8b8 (diff)
parent1143c915c4c29f20d6202c3ec10ebbf04a567c5a (diff)
downloadotp-081a300d27d3b0d0cd21b7b095cfb9056591a6f2.tar.gz
otp-081a300d27d3b0d0cd21b7b095cfb9056591a6f2.tar.bz2
otp-081a300d27d3b0d0cd21b7b095cfb9056591a6f2.zip
Merge pull request #1601 from josevalim/patch-9
Document the guarantees provided by get_stacktrace OTP-14687
Diffstat (limited to 'erts')
-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>