From 8276831a98ebe3d3b821ffcc1093acbebf0c6022 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 28 Oct 2014 14:11:20 +0100 Subject: Add stack trace for gen_server exit in ERROR REPORT If a callback function was terminated with exit/1, there would be no stack trace in the ERROR REPORT produced by gen_server. This has been corrected. The actual exit reason for the process is not changed. --- lib/stdlib/test/gen_server_SUITE.erl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/stdlib/test/gen_server_SUITE.erl') diff --git a/lib/stdlib/test/gen_server_SUITE.erl b/lib/stdlib/test/gen_server_SUITE.erl index 42694d8b5d..0f03fda30a 100644 --- a/lib/stdlib/test/gen_server_SUITE.erl +++ b/lib/stdlib/test/gen_server_SUITE.erl @@ -275,7 +275,9 @@ crash(Config) when is_list(Config) -> receive {error,_GroupLeader4,{Pid4, "** Generic server"++_, - [Pid4,crash,{formatted, state4},crashed]}} -> + [Pid4,crash,{formatted, state4}, + {crashed,[{?MODULE,handle_call,3,_} + |_Stacktrace]}]}} -> ok; Other4a -> ?line io:format("Unexpected: ~p", [Other4a]), @@ -1026,7 +1028,9 @@ error_format_status(Config) when is_list(Config) -> receive {error,_GroupLeader,{Pid, "** Generic server"++_, - [Pid,crash,{formatted, State},crashed]}} -> + [Pid,crash,{formatted, State}, + {crashed,[{?MODULE,handle_call,3,_} + |_Stacktrace]}]}} -> ok; Other -> ?line io:format("Unexpected: ~p", [Other]), @@ -1048,7 +1052,9 @@ terminate_crash_format(Config) when is_list(Config) -> receive {error,_GroupLeader,{Pid, "** Generic server"++_, - [Pid,stop, {formatted, State},{crash, terminate}]}} -> + [Pid,stop, {formatted, State}, + {{crash, terminate},[{?MODULE,terminate,2,_} + |_Stacktrace]}]}} -> ok; Other -> io:format("Unexpected: ~p", [Other]), -- cgit v1.2.3