From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6614 invoked by alias); 11 Nov 2009 00:55:12 -0000 Received: (qmail 6603 invoked by uid 22791); 11 Nov 2009 00:55:11 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f192.google.com (HELO mail-pz0-f192.google.com) (209.85.222.192) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Nov 2009 00:55:04 +0000 Received: by pzk30 with SMTP id 30so416806pzk.24 for ; Tue, 10 Nov 2009 16:55:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.74.16 with SMTP id w16mr84660wfa.200.1257900903114; Tue, 10 Nov 2009 16:55:03 -0800 (PST) In-Reply-To: References: <20090928160728.GB9003@adacore.com> <4AD75806.9070705@vmware.com> <4AF07CF2.1050902@vmware.com> From: Hui Zhu Date: Wed, 11 Nov 2009 00:55:00 -0000 Message-ID: Subject: Re: [RFA] let record_resume fail immediately on error To: Tom Tromey Cc: Michael Snyder , Joel Brobecker , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00246.txt.bz2 The callers are very lazy, they like call a function directly. :) Thanks, Hui On Wed, Nov 11, 2009 at 06:04, Tom Tromey wrote: >>>>>> ">" =3D=3D Hui Zhu writes: > >>> It add a new argument "catch" to do_record_message. =A0If catch is true, >>> it will call "record_message" with catch errors. =A0If not, it will call >>> "record_message" directly. > > I don't like this much either. =A0It is trivial for callers that want to > catch errors to catch them. =A0They can use TRY_CATCH or catch_errors(..., > record_message). > > Callers that don't want to catch errors should just call > do_record_message directly. =A0This is both for type safety and also > because such calls are plain old C, and should therefore look like it. > > Tom >