From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 978 invoked by alias); 28 Nov 2001 04:17:00 -0000 Mailing-List: contact gdb-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 952 invoked from network); 28 Nov 2001 04:16:58 -0000 Received: from unknown (HELO localhost.cygnus.com) (24.114.42.213) by hostedprojects.ges.redhat.com with SMTP; 28 Nov 2001 04:16:58 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id 2435C3DC2; Tue, 27 Nov 2001 23:16:58 -0500 (EST) Message-ID: <3C04653A.7000708@cygnus.com> Date: Sun, 18 Nov 2001 10:57:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.3) Gecko/20011020 X-Accept-Language: en-us MIME-Version: 1.0 To: Don Howard Cc: gdb@sources.redhat.com Subject: Re: error-catching mechanism for scripts References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2001-11/txt/msg00188.txt.bz2 Message-ID: <20011118105700.utXiIa5VF49SdGmW33I_ZVDwV4gNw452xoXIXsSAVbk@z> > > > > Ok, I've got a partial implementation of the try/catch idea that I'd like > to get some feedback on. (Let me know if I'm headed the right way before > I spend too much time on this) > > I know that the keywords try/catch (esp catch) won't work, as gdb already > has a catch command. I'd appreciate a suggestion on what to name this > command. For now I've simple gone with CATCH (all caps) to avoid name > collisions. From M3: Try Except: http://www.research.compaq.com/SRC/m3defn/html/tryexcept.html TRY Body ... EXCEPT exception => action; ... END Try Finally: http://www.research.compaq.com/SRC/m3defn/html/tryfinally.html TRY statement 1; FINALLY statement 2; END might give you ideas and potential semantic issues. eg http://www.research.compaq.com/SRC/m3defn/html/exit.html Another key word might be trap? Andrew