Permalink
Browse files

Merge branch 'mh/create_cookie_error_msg' into maint

* mh/create_cookie_error_msg:
  Specify file name and error on create_cookie failure

  OTP-9954
  • Loading branch information...
Gustav Simonsson
Gustav Simonsson committed Mar 1, 2012
2 parents 3750ac2 + 9319587 commit 1bc4f4c35876a8dcccad66129e68f602751f6e36
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/kernel/src/auth.erl
View
@@ -381,13 +381,17 @@ create_cookie(Name) ->
case {R1, R2} of
{ok, ok} ->
ok;
{{error,_Reason}, _} ->
{error, "Failed to create cookie file"};
{{error,Reason}, _} ->
{error,
lists:flatten(
io_lib:format("Failed to write to cookie file '~s': ~p", [Name, Reason]))};
{ok, {error, Reason}} ->
{error, "Failed to change mode: " ++ atom_to_list(Reason)}
end;
{error,_Reason} ->
{error, "Failed to create cookie file"}
{error,Reason} ->
{error,
lists:flatten(
io_lib:format("Failed to create cookie file '~s': ~p", [Name, Reason]))}
end.
random_cookie(0, _, Result) ->

0 comments on commit 1bc4f4c

Please sign in to comment.