From 4aa85c538c2148ec00bab9944c8d73cd45c5b31e Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 17 Apr 2020 14:58:29 +0200 Subject: [PATCH] When rescode is some unexpected, probably error message, print it --- src/ejabberd_ctl.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index 9dd4a2981..0a394b272 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -472,7 +472,9 @@ make_status(ok) -> ?STATUS_SUCCESS; make_status(true) -> ?STATUS_SUCCESS; make_status(Code) when is_integer(Code), Code > 255 -> ?STATUS_ERROR; make_status(Code) when is_integer(Code), Code > 0 -> Code; -make_status(_Error) -> ?STATUS_ERROR. +make_status(Error) -> + io:format("Error: ~p~n", [Error]), + ?STATUS_ERROR. get_list_commands(Version) -> try ejabberd_commands:list_commands(Version) of