mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Provide stacktrace in log report when a transaction fails
This commit is contained in:
parent
ff455f1a42
commit
9cbf08700d
@ -551,7 +551,10 @@ transaction(Host, Tab, Fun) ->
|
||||
{atomic, _} = Good ->
|
||||
Good;
|
||||
{aborted, Reason} = Bad ->
|
||||
?ERROR_MSG("Transaction failed for host ~p in tab ~p with fun ~p:~n~p", [Host, Tab, Fun, Reason]),
|
||||
Stacktrace = erlang:get_stacktrace(),
|
||||
?ERROR_MSG("Transaction failed for host ~p in tab ~p with fun ~p:"
|
||||
"~nReason: ~p~nStacktrace: ~p",
|
||||
[Host, Tab, Fun, Reason, Stacktrace]),
|
||||
Bad
|
||||
end.
|
||||
transaction2(Host, Tab, Fun) ->
|
||||
|
Loading…
Reference in New Issue
Block a user