From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1464 invoked by alias); 19 Dec 2001 10:36:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1331 invoked from network); 19 Dec 2001 10:36:53 -0000 Received: from unknown (HELO localhost.cygnus.com) (195.224.55.237) by sources.redhat.com with SMTP; 19 Dec 2001 10:36:53 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id D738A3E8F; Wed, 19 Dec 2001 10:36:49 +0000 (GMT) Message-ID: <3C206DC1.2030009@cygnus.com> Date: Wed, 19 Dec 2001 02:36:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.6) Gecko/20011207 X-Accept-Language: en-us MIME-Version: 1.0 To: Don Howard Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] error-catching mechanism for scripts References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00456.txt.bz2 > try > some commands that might error > except > some commands to recover from error > (errors in this block will not be caught) > end Just a question. Given: try try some commands that might error except some commands to recover from error (erros in this block will not be caught) end end I assume the outer try catches errors from the inner except. Looking at the code, I think this is what happens and, I think, is correct. What about CNTRL-C? Does that abort the commands or does except catch it? Hmm (thinking out loud). What about internal-error, er, that throws an ``error'' which the user can now catch. I guess for the moment this is a feature :-) BTW, catch_errors() is discouraged in favour of catch_exceptions(). PTR -> void *. I see the tests are comming. Ya! Can I suggest expanding the doco to include an example. Even if it is just the example you posted with ``some commands that might error'' etc. I can't think of something that is guarenteed to cause a error - ah, a `maint error'' command :-/ Andrew