From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25976 invoked by alias); 30 Oct 2012 17:43:24 -0000 Received: (qmail 25967 invoked by uid 22791); 30 Oct 2012 17:43:23 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Oct 2012 17:43:16 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9UHhEu6021163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Oct 2012 13:43:14 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9UHhD7e030414 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 30 Oct 2012 13:43:14 -0400 From: Tom Tromey To: Pedro Alves Cc: "Maucci\, Cyrille" , "gdb\@sourceware.org" Subject: Re: working around batch mode command errors References: <7D0928B9A8397D4B9E2F9E5FFFB8D860027BED37@G6W2492.americas.hpqcorp.net> <509010B5.6050309@redhat.com> Date: Tue, 30 Oct 2012 17:43:00 -0000 In-Reply-To: <509010B5.6050309@redhat.com> (Pedro Alves's message of "Tue, 30 Oct 2012 17:39:01 +0000") Message-ID: <87390vyhxq.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00121.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> There's no try/catch mechanism in the CLI unfortunately, but I Pedro> think you could come up with one in python gdb. ISTR Tromey had Pedro> a python command wrapper that swallows CLI errors? Yeah, http://www.sourceware.org/ml/gdb/2010-06/msg00100.html There's a more full-blown try/catch implementation in bugzilla. That one isn't in Python. I don't know why it never went in. This seems to be a frequently requested feature. Tom