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 62A65797D for ; Tue, 1 Nov 2011 19:53:54 +0000 (UTC) Received: (qmail 4225 invoked by uid 500); 1 Nov 2011 19:53:53 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 4184 invoked by uid 500); 1 Nov 2011 19:53:53 -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 4162 invoked by uid 99); 1 Nov 2011 19:53:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 19:53:53 +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 19:53:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8E4B032CCA9 for ; Tue, 1 Nov 2011 19:53:32 +0000 (UTC) Date: Tue, 1 Nov 2011 19:53:32 +0000 (UTC) From: "Filipe Manana (Commented) (JIRA)" To: dev@couchdb.apache.org Message-ID: <47531265.47139.1320177212584.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1192190801.39184.1320025472237.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (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 [ https://issues.apache.org/jira/browse/COUCHDB-1326?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13= 141504#comment-13141504 ]=20 Filipe Manana commented on COUCHDB-1326: ---------------------------------------- We do, check the function couch_httpd:error_info/2. For this particular case, which happens on startup, the code is a bit repea= ted. However when handling such an error for a request, we have common code= . Examples from COUCHDB-966 $ curl -H 'X-Couch-Persist: true' -X PUT http://localhost:5984/_config/couc= hdb/delayed_commits -d '"false"'=20 {"error":"file_permission_error","reason":"/home/fdmanana/git/hub/couchdb/e= tc/couchdb/local_dev.ini"}=20 For a database file for which we don't have read permission:=20 $ curl http://localhost:5984/abc=20 {"error":"file_permission_error","reason":"/home/fdmanana/git/hub/couchdb/t= mp/lib/abc.couch"}=20 Thanks for the report and patch :) =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