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 ->
|
{atomic, _} = Good ->
|
||||||
Good;
|
Good;
|
||||||
{aborted, Reason} = Bad ->
|
{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
|
Bad
|
||||||
end.
|
end.
|
||||||
transaction2(Host, Tab, Fun) ->
|
transaction2(Host, Tab, Fun) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user