Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E49527862 for ; Tue, 1 Nov 2011 16:15:56 +0000 (UTC) Received: (qmail 33769 invoked by uid 500); 1 Nov 2011 16:15:56 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 33680 invoked by uid 500); 1 Nov 2011 16:15:56 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 33577 invoked by uid 99); 1 Nov 2011 16:15:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 16:15:56 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 16:15:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 93AE532CB59 for ; Tue, 1 Nov 2011 16:15:32 +0000 (UTC) Date: Tue, 1 Nov 2011 16:15:32 +0000 (UTC) From: "Filipe Manana (Updated) (JIRA)" To: dev@couchdb.apache.org Message-ID: <1597976919.46219.1320164132606.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1192190801.39184.1320025472237.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (COUCHDB-1326) scanty error message when writing to uri_file fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-1326?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Filipe Manana updated COUCHDB-1326: ----------------------------------- Attachment: COUCHDB-1326-fdmanana.patch Thanks Rogut=C3=A8s. I'm attaching here a patch with a few minor changes. I would like to have y= our feedback about them. 1) We use indentation level of 4 spaces (you had 2 spaces); 2) Slightly changed the error message for a bit more style; 3) At this point we can use the logger and no need for io:format/2; 4) I'm catching eaccess specifically - this is a very common error and it's= more user friendly to report "file permission error" directly rather then = the more cryptic eaccess - we already do this in some places, for e.g.: ht= tps://github.com/apache/couchdb/blob/trunk/src/couchdb/couch_config_writer.= erl#L38 Let me know what you think :) =20 > scanty error message when writing to uri_file fails > --------------------------------------------------- > > Key: COUCHDB-1326 > URL: https://issues.apache.org/jira/browse/COUCHDB-1326 > Project: CouchDB > Issue Type: Bug > Reporter: Rogut=C4=97s Sparnuotos > Priority: Minor > Attachments: 0001-A-more-useful-error-when-writing-to-uri_file-fa= ils.patch, 0001-A-more-useful-error-when-writing-to-uri_file-fails.patch, C= OUCHDB-1326-fdmanana.patch > > > CouchDB crashes when it fails writing to uri_file (set from the [couchdb]= section). The error message is too vague to understand what's going on: "{= {badmatch,{error,enoent}}". At least the filename should be mentioned. > P.S. > I'd say it's all Erlang's fault, because file:write_file() doesn't report= the file name on errors. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira