aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/gen_server.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-05-19 15:27:46 +0200
committerGitHub <[email protected]>2017-05-19 15:27:46 +0200
commit52ace0d2c565a67e587159780114792c55244312 (patch)
tree1b21b16cc9c14cf78f4c9ed30f302bd8165a8736 /lib/stdlib/src/gen_server.erl
parent7ff352ef8a5393a017ce493ba1a1fc3be54be245 (diff)
parenta237426d43b73d931739d9acb86a17513b44ed3e (diff)
downloadotp-52ace0d2c565a67e587159780114792c55244312.tar.gz
otp-52ace0d2c565a67e587159780114792c55244312.tar.bz2
otp-52ace0d2c565a67e587159780114792c55244312.zip
Merge branch 'master' into jv-gen-server-exits
Diffstat (limited to 'lib/stdlib/src/gen_server.erl')
-rw-r--r--lib/stdlib/src/gen_server.erl15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl
index 4e9dea8e5a..a3d53efd0d 100644
--- a/lib/stdlib/src/gen_server.erl
+++ b/lib/stdlib/src/gen_server.erl
@@ -107,8 +107,6 @@
%% Internal exports
-export([init_it/6]).
--import(error_logger, [format/2]).
-
-define(
STACKTRACE(),
try throw(ok) catch _ -> erlang:get_stacktrace() end).
@@ -879,14 +877,15 @@ error_info(Reason, Name, From, Msg, State, Debug) ->
end
end;
_ ->
- Reason
+ error_logger:limit_term(Reason)
end,
{ClientFmt, ClientArgs} = client_stacktrace(From),
- format("** Generic server ~p terminating \n"
- "** Last message in was ~p~n"
- "** When Server state == ~p~n"
- "** Reason for termination == ~n** ~p~n" ++ ClientFmt,
- [Name, Msg, State, Reason1] ++ ClientArgs),
+ LimitedState = error_logger:limit_term(State),
+ error_logger:format("** Generic server ~p terminating \n"
+ "** Last message in was ~p~n"
+ "** When Server state == ~p~n"
+ "** Reason for termination == ~n** ~p~n" ++ ClientFmt,
+ [Name, Msg, LimitedState, Reason1] ++ ClientArgs),
sys:print_log(Debug),
ok.
client_stacktrace(undefined) ->