Skip to content

Commit

Permalink
Adds check_membership/2 clause for handling non-existant gm group
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayanda-D committed Aug 15, 2016
1 parent 6d0ca9c commit 53f10c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gm.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,9 @@ check_membership(Self, #gm_group{members = M} = Group) ->
Group;
false ->
throw(lost_membership)
end.
end;
check_membership(_Self, {error, not_found}) ->
throw(lost_membership).

check_membership(GroupName) ->
case dirty_read_group(GroupName) of
Expand Down

0 comments on commit 53f10c9

Please sign in to comment.