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 232BC751D for ; Tue, 1 Nov 2011 12:04:56 +0000 (UTC) Received: (qmail 1824 invoked by uid 500); 1 Nov 2011 12:04:55 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 1789 invoked by uid 500); 1 Nov 2011 12:04:55 -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 1781 invoked by uid 99); 1 Nov 2011 12:04:55 -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 12:04:55 +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 12:04: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 3F23E32C427 for ; Tue, 1 Nov 2011 12:04:32 +0000 (UTC) Date: Tue, 1 Nov 2011 12:04:32 +0000 (UTC) From: "Filipe Manana (Commented) (JIRA)" To: dev@couchdb.apache.org Message-ID: <61960336.45337.1320149072260.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 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-1326?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13= 141093#comment-13141093 ]=20 Filipe Manana commented on COUCHDB-1326: ---------------------------------------- Thanks Rogut=C4=97s However the following will not work: + Error2 -> throw(io:format("Failed to write uri_file ~s, error ~p~n= ", + [UriFile, Error2])) You'll want to call io_lib:format instead, which returns an IOList. Then yo= u should call lists:flatten over the result of io_lib:format to make sure w= e get a more human readable string. Wanna give it a 2nd try? :) =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 > > > 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