This is the mail archive of the gdb-patches@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: [RFA] error-catching mechanism for scripts


>  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





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