Skip to content

Commit 62e267f

Browse files
committed
Pre Erlang 21 stacktrace
1 parent ec7a8c2 commit 62e267f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/rabbit_sysmon_handler.erl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,11 @@ format_pretty_proc_or_port_info(PidOrPort) ->
175175
Res ->
176176
Res
177177
end
178-
catch C:E:S ->
179-
{"Pid ~w, ~W ~W at ~w\n",
180-
[PidOrPort, C, 20, E, 20, S]}
178+
catch C:E ->
179+
S = erlang:get_stacktrace(),
180+
Fmt = "Pid ~w, ~W ~W at ~w\n",
181+
Args = [PidOrPort, C, 20, E, 20, S],
182+
{Fmt, Args}
181183
end.
182184

183185
get_pretty_proc_or_port_info(Pid) when is_pid(Pid) ->

0 commit comments

Comments
 (0)