From 6305ddca187a2f2c6041bce31cacba7356ee7f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 5 Dec 2008 15:08:03 +0000 Subject: [PATCH] Add the module and function names to the error message, when a module crash. SVN Revision: 1704 --- ChangeLog | 3 +++ src/gen_iq_handler.erl | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3c7fd187a..17685cbf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ src/mod_vcard_odbc.erl, src/mod_private_odbc.erl, src/jd2ejd.erl: Update Exmpp XML parser options. + * src/gen_iq_handler.erl: Add the module and function names to the + error message, when a module crash. + 2008-12-03 Jean-Sébastien Pédron * src/mod_proxy65/mod_proxy65_stream.erl, diff --git a/src/gen_iq_handler.erl b/src/gen_iq_handler.erl index 0a4de407f..130934ca3 100644 --- a/src/gen_iq_handler.erl +++ b/src/gen_iq_handler.erl @@ -124,7 +124,8 @@ process_iq(_Host, Module, Function, From, To, IQ_Rec) -> ejabberd_router:route(To, From, Reply) catch _Class:Reason -> - ?ERROR_MSG("~p~n~p~n", [Reason, erlang:get_stacktrace()]) + ?ERROR_MSG("~s:~s/3 crashed: ~p~n~p~n", + [Module, Function, Reason, erlang:get_stacktrace()]) end. %%====================================================================