From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30733 invoked by alias); 25 Nov 2009 16:25:16 -0000 Received: (qmail 30701 invoked by uid 22791); 25 Nov 2009 16:25:15 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Nov 2009 16:25:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F15882BABEA; Wed, 25 Nov 2009 11:25:03 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id joxwj6reAtIE; Wed, 25 Nov 2009 11:25:03 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6D2E02BAC10; Wed, 25 Nov 2009 11:25:02 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 07692F5905; Wed, 25 Nov 2009 11:24:58 -0500 (EST) Date: Wed, 25 Nov 2009 16:25:00 -0000 From: Joel Brobecker To: Hui Zhu Cc: tromey@redhat.com, "gdb-patches@sourceware.org" , Michael Snyder Subject: Re: [RFA] let record_resume fail immediately on error Message-ID: <20091125162458.GF26004@adacore.com> References: <4AF07CF2.1050902@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00550.txt.bz2 > Why "do_record_message" cannot be a caller? > It be a caller in a long time. > I call "record_message". You don't like it. > I put it to "do_record_message". You don't like it too. It did not seem to me that the feedback was on the function name, but rather on the interface of the function. > I don't like use TRY_CATCH or catch_errors directly. I confess that I don't like catch_errors, because of the need to artificially create a container type that contains all the function parameters. But TRY_CATCH, on the other hand, solves that problem. What is it that you don't like about TRY_CATCH. As far as I can tell, the syntax is very close to C++, no? In any case, if you really want to have either possibilities (record_message with or without exception protection), how about two functions, named: record_message and safe_record_message. The latter is just a TRY_CATCH wrapper around the former. Perhaps that could be an acceptable compromise... -- Joel