summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_server_sup.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/couchdb/couch_server_sup.erl')
-rw-r--r--src/couchdb/couch_server_sup.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/couchdb/couch_server_sup.erl b/src/couchdb/couch_server_sup.erl
index 7baede338..be3c3a3e4 100644
--- a/src/couchdb/couch_server_sup.erl
+++ b/src/couchdb/couch_server_sup.erl
@@ -46,7 +46,9 @@ start_server(IniFiles) ->
{ok, [PidFile]} ->
case file:write_file(PidFile, os:getpid()) of
ok -> ok;
- Error -> io:format("Failed to write PID file ~s, error: ~p", [PidFile, Error])
+ {error, Reason} ->
+ io:format("Failed to write PID file ~s: ~s",
+ [PidFile, file:format_error(Reason)])
end;
_ -> ok
end,
@@ -121,12 +123,10 @@ start_server(IniFiles) ->
end end || Uri <- Uris],
case file:write_file(UriFile, Lines) of
ok -> ok;
- {error, eacces} ->
- ?LOG_ERROR("Permission error when writing to URI file ~s", [UriFile]),
- throw({file_permission_error, UriFile});
- Error2 ->
- ?LOG_ERROR("Failed to write to URI file ~s: ~p~n", [UriFile, Error2]),
- throw(Error2)
+ {error, Reason2} = Error ->
+ ?LOG_ERROR("Failed to write to URI file ~s: ~s",
+ [UriFile, file:format_error(Reason2)]),
+ throw(Error)
end
end,