Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
1041-erlang-module-doc-raise-3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1041-erlang-module-doc-raise-3.patch of Package erlang
From 3dff5bf524f2482b9985fe50a6b89030e3877da3 Mon Sep 17 00:00:00 2001 From: Kjell Winblad <kjellwinblad@gmail.com> Date: Wed, 23 Sep 2020 09:37:45 +0200 Subject: [PATCH 31/39] erlang module doc: raise/3 * Fix type spec * raise/3 does not stop execution it raises exception --- erts/doc/src/erlang.xml | 14 +++++++++----- erts/preloaded/src/erlang.erl | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index a935130658..e5fedec2bb 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6061,18 +6061,18 @@ RealSystem = system + MissedSystem</code> <func> <name name="raise" arity="3"/> - <fsummary>Stop execution with an exception of specified class, reason, + <fsummary>Raises exception of specified class, reason, and call stack backtrace.</fsummary> <type name="raise_stacktrace"/> <desc> - <p>Stops the execution of the calling process with an - exception of the specified class, reason, and call stack backtrace + <p>Raises exception of the specified class, reason, and call stack backtrace (<em>stacktrace</em>).</p> <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>throw</c>. So, if it were not for the stacktrace, <c>erlang:raise(<anno>Class</anno>, <anno>Reason</anno>, <anno>Stacktrace</anno>)</c> is equivalent to - <c>erlang:<anno>Class</anno>(<anno>Reason</anno>)</c>.</p> + <c>erlang:<anno>Class</anno>(<anno>Reason</anno>)</c> (given that <c><anno>Class</anno></c> + is a valid class).</p> <p><c><anno>Reason</anno></c> is any term. <c><anno>Stacktrace</anno></c> is a list as returned from <c>get_stacktrace()</c>, that is, a list of @@ -6102,6 +6102,10 @@ end</pre> <c>error(erlang:raise(<anno>Class</anno>, <anno>Reason</anno>, <anno>Stacktrace</anno>))</c> and hope to distinguish exceptions later.</p> + <p>See the reference manual about <seealso + marker="system/reference_manual:errors">errors and error + handling</seealso> for more information about exception + classes and how to catch exceptions.</p> </desc> </func> diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl index 60caad2b1e..6c2ff97312 100644 --- a/erts/preloaded/src/erlang.erl +++ b/erts/preloaded/src/erlang.erl @@ -1654,7 +1654,7 @@ put(_Key, _Val) -> erlang:nif_error(undefined). %% raise/3 --spec erlang:raise(Class, Reason, Stacktrace) -> no_return() when +-spec erlang:raise(Class, Reason, Stacktrace) -> badarg when Class :: error | exit | throw, Reason :: term(), Stacktrace :: raise_stacktrace(). -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor