Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Don Howard <dhoward@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: error-catching mechanism for scripts
Date: Tue, 27 Nov 2001 20:17:00 -0000	[thread overview]
Message-ID: <3C04653A.7000708@cygnus.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0111270827180.2426-100000@theotherone.redhat-remotie.org>

> 
> 
> 
> 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




WARNING: multiple messages have this Message-ID
From: Andrew Cagney <ac131313@cygnus.com>
To: Don Howard <dhoward@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: error-catching mechanism for scripts
Date: Sun, 18 Nov 2001 10:57:00 -0000	[thread overview]
Message-ID: <3C04653A.7000708@cygnus.com> (raw)
Message-ID: <20011118105700.utXiIa5VF49SdGmW33I_ZVDwV4gNw452xoXIXsSAVbk@z> (raw)
In-Reply-To: <Pine.LNX.4.33.0111270827180.2426-100000@theotherone.redhat-remotie.org>

> 
> 
> 
> 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




  parent reply	other threads:[~2001-11-27 20:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-27  8:43 Don Howard
2001-11-17 12:21 ` Don Howard
2001-11-27 20:17 ` Andrew Cagney [this message]
2001-11-18 10:57   ` Andrew Cagney
2001-11-19 15:11   ` Fernando Nasser
2001-11-28  6:52     ` Fernando Nasser
2001-11-28  6:57     ` Arnaud Charlet
2001-11-20  8:44       ` Arnaud Charlet
  -- strict thread matches above, loose matches on Subject: below --
2001-11-02  6:11 Don Howard
2001-11-02  8:33 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C04653A.7000708@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=dhoward@redhat.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox