mirror of
https://github.com/processone/ejabberd
synced 2025-10-05 19:42:11 +02:00
Improve formatting of exceptions
This commit is contained in:
parent
368858a744
commit
80beb6d6f6
12 changed files with 122 additions and 142 deletions
|
@ -121,12 +121,13 @@ row_to_route(Domain, {ServerHost, NodeS, PidS, LocalHintS} = Row) ->
|
|||
local_hint = dec_local_hint(LocalHintS)}]
|
||||
catch _:{bad_node, _} ->
|
||||
[];
|
||||
?EX_RULE(E, R, St) ->
|
||||
?EX_RULE(Class, Reason, St) ->
|
||||
StackTrace = ?EX_STACK(St),
|
||||
?ERROR_MSG("Failed to decode row from 'route' table:~n"
|
||||
"Row = ~p~n"
|
||||
"Domain = ~s~n"
|
||||
"Reason = ~p",
|
||||
[Row, Domain, {E, {R, StackTrace}}]),
|
||||
"** Row = ~p~n"
|
||||
"** Domain = ~s~n"
|
||||
"** ~s",
|
||||
[Row, Domain,
|
||||
misc:format_exception(2, Class, Reason, StackTrace)]),
|
||||
[]
|
||||
end.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue