Rename 'already_existed' to 'already_exists'

This commit is contained in:
Feng Lee 2018-09-04 19:14:25 +08:00
parent eb53d366e9
commit 96122cf966
2 changed files with 2 additions and 2 deletions

View File

@ -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} ->

View File

@ -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} ->