Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/nodetree_dag.erl')
-rw-r--r--src/nodetree_dag.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nodetree_dag.erl b/src/nodetree_dag.erl
index 8ac56b27d..a105db832 100644
--- a/src/nodetree_dag.erl
+++ b/src/nodetree_dag.erl
@@ -69,13 +69,13 @@ create_node(Key, Node, Type, Owner, Options, Parents) ->
Other -> Other
end;
_ ->
- {error, ?ERR_CONFLICT}
+ {error, ?ERRT_CONFLICT(?MYLANG, <<"Node already exists">>)}
end.
delete_node(Key, Node) ->
case find_node(Key, Node) of
false ->
- {error, ?ERR_ITEM_NOT_FOUND};
+ {error, ?ERRT_ITEM_NOT_FOUND(?MYLANG, <<"Node not found">>)};
Record ->
lists:foreach(fun (#pubsub_node{options = Opts} = Child) ->
NewOpts = remove_config_parent(Node, Opts),
@@ -99,7 +99,7 @@ get_node(Host, Node, _From) ->
get_node(Host, Node) ->
case find_node(Host, Node) of
- false -> {error, ?ERR_ITEM_NOT_FOUND};
+ false -> {error, ?ERRT_ITEM_NOT_FOUND(?MYLANG, <<"Node not found">>)};
Record -> Record
end.
@@ -115,7 +115,7 @@ get_nodes(Key) ->
get_parentnodes(Host, Node, _From) ->
case find_node(Host, Node) of
false ->
- {error, ?ERR_ITEM_NOT_FOUND};
+ {error, ?ERRT_ITEM_NOT_FOUND(?MYLANG, <<"Node not found">>)};
#pubsub_node{parents = Parents} ->
Q = qlc:q([N
|| #pubsub_node{nodeid = {NHost, NNode}} = N
@@ -139,7 +139,7 @@ get_subnodes(Host, <<>>) ->
get_subnodes_helper(Host, <<>>);
get_subnodes(Host, Node) ->
case find_node(Host, Node) of
- false -> {error, ?ERR_ITEM_NOT_FOUND};
+ false -> {error, ?ERRT_ITEM_NOT_FOUND(?MYLANG, <<"Node not found">>)};
_ -> get_subnodes_helper(Host, Node)
end.
@@ -238,7 +238,7 @@ validate_parentage(Key, Owners, [<<>> | T]) ->
validate_parentage(Key, Owners, [ParentID | T]) ->
case find_node(Key, ParentID) of
false ->
- {error, ?ERR_ITEM_NOT_FOUND};
+ {error, ?ERRT_ITEM_NOT_FOUND(?MYLANG, <<"Node not found">>)};
#pubsub_node{owners = POwners, options = POptions} ->
NodeType = find_opt(node_type, ?DEFAULT_NODETYPE, POptions),
MutualOwners = [O || O <- Owners, PO <- POwners, O == PO],