aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-02-05 12:33:21 +0100
committerHans Bolinder <[email protected]>2018-02-05 14:45:37 +0100
commit798f2151429ef7ea05d858e5ba9efc6d5cc3e10a (patch)
tree181f2eac563fc62baa80f3a5a3c8caa443721073 /lib/kernel/src
parentb2e979e1b0cc376e7408cbdd480eb140b533f75a (diff)
downloadotp-798f2151429ef7ea05d858e5ba9efc6d5cc3e10a.tar.gz
otp-798f2151429ef7ea05d858e5ba9efc6d5cc3e10a.tar.bz2
otp-798f2151429ef7ea05d858e5ba9efc6d5cc3e10a.zip
kernel: Do not call erlang:get_stacktrace()
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/dist_util.erl4
-rw-r--r--lib/kernel/src/error_handler.erl4
-rw-r--r--lib/kernel/src/file.erl4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/kernel/src/dist_util.erl b/lib/kernel/src/dist_util.erl
index fb9f7fd7eb..5ea0ca991f 100644
--- a/lib/kernel/src/dist_util.erl
+++ b/lib/kernel/src/dist_util.erl
@@ -539,8 +539,8 @@ do_setnode(#hs_data{other_node = Node, socket = Socket,
"no table space left for node ~w ** ~n",
[Node]),
?shutdown(Node);
- error:Other ->
- exit({Other, erlang:get_stacktrace()})
+ error:Other:Stacktrace ->
+ exit({Other, Stacktrace})
end;
_ ->
error_msg("** Distribution connection error, "
diff --git a/lib/kernel/src/error_handler.erl b/lib/kernel/src/error_handler.erl
index 59ca8e690d..a9582c6225 100644
--- a/lib/kernel/src/error_handler.erl
+++ b/lib/kernel/src/error_handler.erl
@@ -106,8 +106,8 @@ crash(M, F, A) ->
crash(Tuple) ->
try erlang:error(undef)
catch
- error:undef ->
- Stk = [Tuple|tl(erlang:get_stacktrace())],
+ error:undef:Stacktrace ->
+ Stk = [Tuple|tl(Stacktrace)],
erlang:raise(error, undef, Stk)
end.
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index d05199897f..c2df1ee288 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -1382,8 +1382,8 @@ eval_stream2({ok,Form,EndLine}, Fd, H, Last, E, Bs0) ->
try erl_eval:exprs(Form, Bs0) of
{value,V,Bs} ->
eval_stream(Fd, H, EndLine, {V}, E, Bs)
- catch Class:Reason ->
- Error = {EndLine,?MODULE,{Class,Reason,erlang:get_stacktrace()}},
+ catch Class:Reason:StackTrace ->
+ Error = {EndLine,?MODULE,{Class,Reason,StackTrace}},
eval_stream(Fd, H, EndLine, Last, [Error|E], Bs0)
end;
eval_stream2({error,What,EndLine}, Fd, H, Last, E, Bs) ->