aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGustav Simonsson <[email protected]>2012-03-01 14:28:06 +0100
committerGustav Simonsson <[email protected]>2012-03-01 14:28:30 +0100
commit1bc4f4c35876a8dcccad66129e68f602751f6e36 (patch)
tree14305bb8578aef235e664f4d73faeaa19b9c6a48 /lib
parent3750ac230e0af600417fff900b3d5ef242fb18c7 (diff)
parent9319587de60b67f3de689de60b473136fd45cadd (diff)
downloadotp-1bc4f4c35876a8dcccad66129e68f602751f6e36.tar.gz
otp-1bc4f4c35876a8dcccad66129e68f602751f6e36.tar.bz2
otp-1bc4f4c35876a8dcccad66129e68f602751f6e36.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/src/auth.erl12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/kernel/src/auth.erl b/lib/kernel/src/auth.erl
index c329a5652a..252c20ac4e 100644
--- a/lib/kernel/src/auth.erl
+++ b/lib/kernel/src/auth.erl
@@ -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) ->