Rename 'already_existed' to 'already_exists'
This commit is contained in:
parent
eb53d366e9
commit
96122cf966
|
@ -154,7 +154,7 @@ init([]) ->
|
|||
handle_call({register_mod, Type, Mod, Opts, Seq}, _From, State) ->
|
||||
Mods = lookup_mods(Type),
|
||||
reply(case lists:keymember(Mod, 1, Mods) of
|
||||
true -> {error, already_existed};
|
||||
true -> {error, already_exists};
|
||||
false ->
|
||||
case catch Mod:init(Opts) of
|
||||
{ok, ModState} ->
|
||||
|
|
|
@ -78,7 +78,7 @@ init([]) ->
|
|||
handle_call({start_trace, Who, LogFile}, _From, State = #state{level = Level, traces = Traces}) ->
|
||||
case catch lager:trace_file(LogFile, [Who], Level, ?OPTIONS) of
|
||||
{ok, exists} ->
|
||||
{reply, {error, already_existed}, State};
|
||||
{reply, {error, already_exists}, State};
|
||||
{ok, Trace} ->
|
||||
{reply, ok, State#state{traces = maps:put(Who, {Trace, LogFile}, Traces)}};
|
||||
{error, Reason} ->
|
||||
|
|
Loading…
Reference in New Issue