mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Log HTTP handler exceptions
This commit is contained in:
parent
03cbc9b004
commit
f650b1e83c
@ -370,7 +370,15 @@ process(Handlers, Request) ->
|
|||||||
HandlerModule:socket_handoff(
|
HandlerModule:socket_handoff(
|
||||||
LocalPath, Request, HandlerOpts);
|
LocalPath, Request, HandlerOpts);
|
||||||
false ->
|
false ->
|
||||||
HandlerModule:process(LocalPath, Request)
|
try
|
||||||
|
HandlerModule:process(LocalPath, Request)
|
||||||
|
catch
|
||||||
|
Class:Reason:Stack ->
|
||||||
|
?ERROR_MSG(
|
||||||
|
"HTTP handler crashed: ~s",
|
||||||
|
[misc:format_exception(2, Class, Reason, Stack)]),
|
||||||
|
erlang:raise(Class, Reason, Stack)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
ejabberd_hooks:run(http_request_debug, [{LocalPath, Request}]),
|
ejabberd_hooks:run(http_request_debug, [{LocalPath, Request}]),
|
||||||
R;
|
R;
|
||||||
|
Loading…
Reference in New Issue
Block a user