diff options
author | Björn Gustavsson <[email protected]> | 2016-05-16 11:58:28 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-05-16 11:58:28 +0200 |
commit | 2fccb09b710b1e42157b3801ac1b154f76ae6898 (patch) | |
tree | 05acc795836628b1e4f7dad4d37d69199dd2a7f3 | |
parent | f45c3aa375bc8925366a0844195d8bb0b26879f5 (diff) | |
download | otp-2fccb09b710b1e42157b3801ac1b154f76ae6898.tar.gz otp-2fccb09b710b1e42157b3801ac1b154f76ae6898.tar.bz2 otp-2fccb09b710b1e42157b3801ac1b154f76ae6898.zip |
Remove the warning about using erlang:raise/3
There is no good reason to say that erlang:raise/3 is only for
debugging. Here is an example where it can be extremely
useful:
try
do_something(Args)
catch Class:Error ->
Stack = erlang:get_stacktrace(),
io:format("Args: ~p\n", [Args]),
erlang:raise(Class, Error, Stack)
That is, we can let it crash, but log additional useful
information before crashing.
Noticed-by: Per Hedeland
-rw-r--r-- | erts/doc/src/erlang.xml | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index e0723127f2..34933d6f48 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -5070,10 +5070,6 @@ os_prompt% </pre> <p>Stops the execution of the calling process with an exception of given class, reason, and call stack backtrace (<em>stacktrace</em>).</p> - <warning> - <p>This BIF is intended for debugging. Avoid to use it in applications, - unless you really know what you are doing.</p> - </warning> <p><c><anno>Class</anno></c> is <c>error</c>, <c>exit</c>, or <c>throw</c>. So, if it were not for the stacktrace, <c>erlang:raise(<anno>Class</anno>, <anno>Reason</anno>, |