From issues-return-2056-apmail-stdcxx-issues-archive=stdcxx.apache.org@stdcxx.apache.org Mon Jun 02 19:18:05 2008 Return-Path: Delivered-To: apmail-stdcxx-issues-archive@locus.apache.org Received: (qmail 70014 invoked from network); 2 Jun 2008 19:18:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jun 2008 19:18:05 -0000 Received: (qmail 57611 invoked by uid 500); 2 Jun 2008 19:18:08 -0000 Delivered-To: apmail-stdcxx-issues-archive@stdcxx.apache.org Received: (qmail 57588 invoked by uid 500); 2 Jun 2008 19:18:08 -0000 Mailing-List: contact issues-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list issues@stdcxx.apache.org Received: (qmail 57577 invoked by uid 99); 2 Jun 2008 19:18:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 12:18:08 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 19:17:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1050B234C126 for ; Mon, 2 Jun 2008 12:17:45 -0700 (PDT) Message-ID: <1450274902.1212434265052.JavaMail.jira@brutus> Date: Mon, 2 Jun 2008 12:17:45 -0700 (PDT) From: "Martin Sebor (JIRA)" To: issues@stdcxx.apache.org Subject: [jira] Updated: (STDCXX-229) better iostreams exception error messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Sebor updated STDCXX-229: -------------------------------- Severity: Usability (was: Cosmetic) Affects Version/s: 4.2.1 Remaining Estimate: 40h Original Estimate: 40h Summary: better iostreams exception error messages (was: better exception error messages) Set initial estimate. > better iostreams exception error messages > ----------------------------------------- > > Key: STDCXX-229 > URL: https://issues.apache.org/jira/browse/STDCXX-229 > Project: C++ Standard Library > Issue Type: Improvement > Components: 18. Language Support, 19. Diagnostics > Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1 > Environment: all > Reporter: Martin Sebor > Fix For: 4.3 > > Original Estimate: 40h > Remaining Estimate: 40h > > ****Created By: sebor @ Apr 24, 2001 12:11:59 PM**** > Subject: better exception error messages (by using CRTL's strerror()?) (1601) > Date: Tue, 24 Apr 2001 10:57:13 -0400 > From: cxxrtl@cxxc.zko.dec.com > To: OEMSUPPORT@roguewave.com > A customer requested that the what() string for a standard iostream > error be more descriptive, possibly by using the strerror() or > perror() function to return the underlying CRTL error string... > Example: > #define __USE_STD_IOSTREAM > #include > #include > int main() { > try { > std::ofstream out; > out.exceptions(std::ios_base::badbit); > out.open("#3.2_BLUE_%.LinkedText"); > out << "Hello!" << std::endl; > } > catch (std::exception& e) { > perror("The funny looking name that isn't in scope anymore"); > std::cerr << e.what(); > } > } > ------------------------------- test.cxx ------------------------------- > $ run test > The funny looking name that isn't in scope anymore: non-translatable vms > error code: 0x186D4 %rms-f-syn, file specification syntax error > iostream object has failbit set > ****Modified By: sebor @ Sep 29, 2003 11:44:10 AM**** > This would be quite useful but it's non trivial to do in iostreams where exceptions are thrown from stream classes but errors of interest typically occur in stream buffers. Once possibility is to selectively capture and save errno in a thread-safe way (so that it can be later modified w/o affecting the recorded cause of the original error) when it occurs during libc and system calls made from streambuf members and later retrieve it when an exception is about to be thrown from the stream class. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.