This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error-catching mechanism for scripts


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]