mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-28 17:38:54 +01:00
Remove try/catch
This commit is contained in:
parent
faed7698c2
commit
a91ae03dc6
@ -3722,7 +3722,6 @@ get_mucroom_disco_items(StateData) ->
|
|||||||
% Voice request support
|
% Voice request support
|
||||||
|
|
||||||
is_voice_request({xmlelement, "x", _, _} = Elem) ->
|
is_voice_request({xmlelement, "x", _, _} = Elem) ->
|
||||||
try
|
|
||||||
case xml:get_tag_attr_s("xmlns", Elem) of
|
case xml:get_tag_attr_s("xmlns", Elem) of
|
||||||
?NS_XDATA ->
|
?NS_XDATA ->
|
||||||
Fields = jlib:parse_xdata_submit(Elem),
|
Fields = jlib:parse_xdata_submit(Elem),
|
||||||
@ -3730,10 +3729,8 @@ is_voice_request({xmlelement, "x", _, _} = Elem) ->
|
|||||||
fun(X,Y) ->
|
fun(X,Y) ->
|
||||||
check_voice_request_fields(X,Y)
|
check_voice_request_fields(X,Y)
|
||||||
end,
|
end,
|
||||||
true, Fields)
|
true, Fields);
|
||||||
end
|
_ ->
|
||||||
catch
|
|
||||||
error: _ ->
|
|
||||||
false
|
false
|
||||||
end;
|
end;
|
||||||
is_voice_request(Els) ->
|
is_voice_request(Els) ->
|
||||||
@ -3795,7 +3792,6 @@ send_voice_request(From, StateData) ->
|
|||||||
end, Moderators).
|
end, Moderators).
|
||||||
|
|
||||||
is_voice_approvement({xmlelement, "x", _, _} = Elem) ->
|
is_voice_approvement({xmlelement, "x", _, _} = Elem) ->
|
||||||
try
|
|
||||||
case xml:get_tag_attr_s("xmlns", Elem) of
|
case xml:get_tag_attr_s("xmlns", Elem) of
|
||||||
?NS_XDATA ->
|
?NS_XDATA ->
|
||||||
Fields = jlib:parse_xdata_submit(Elem),
|
Fields = jlib:parse_xdata_submit(Elem),
|
||||||
@ -3803,10 +3799,8 @@ is_voice_approvement({xmlelement, "x", _, _} = Elem) ->
|
|||||||
fun(X,Y) ->
|
fun(X,Y) ->
|
||||||
check_voice_approvement_fields(X,Y)
|
check_voice_approvement_fields(X,Y)
|
||||||
end,
|
end,
|
||||||
true, Fields)
|
true, Fields);
|
||||||
end
|
_ ->
|
||||||
catch
|
|
||||||
error: _ ->
|
|
||||||
false
|
false
|
||||||
end;
|
end;
|
||||||
is_voice_approvement(Els) ->
|
is_voice_approvement(Els) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user