File 1199-Remove-the-warning-about-using-erlang-raise-3.patch of Package erlang
From 2fccb09b710b1e42157b3801ac1b154f76ae6898 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Mon, 16 May 2016 11:58:28 +0200
Subject: [PATCH] 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
---
erts/doc/src/erlang.xml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index e072312..34933d6 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>,
--
2.1.4