diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2020-03-23 12:59:30 +0100 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2020-03-23 12:59:30 +0100 |
commit | 63e3fb92d1da6cd823449f80479f0aaa559a1358 (patch) | |
tree | 4ae7134f5baacdf291d717997b5bb88d6f251b82 /src | |
parent | Add baisc tests for webadmin (diff) |
Better handling of xml parse errors in send_stanza
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_admin_extra.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl index f33784a70..db1f37296 100644 --- a/src/mod_admin_extra.erl +++ b/src/mod_admin_extra.erl @@ -1513,6 +1513,9 @@ send_stanza(FromString, ToString, Stanza) -> catch _:{xmpp_codec, Why} -> io:format("incorrect stanza: ~ts~n", [xmpp:format_error(Why)]), {error, Why}; + _:{badmatch, {error, {Code, Why}}} when is_integer(Code) -> + io:format("invalid xml: ~p~n", [Why]), + {error, Why}; _:{badmatch, {error, Why}} -> io:format("invalid xml: ~p~n", [Why]), {error, Why}; |