This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: error-catching mechanism for scripts
Andrew Cagney wrote:
>
> From M3:
>
Excellent suggestion. Thanks.
These is also from Object Pascal, so they are easily recognizable.
It has to be the try ... except construct though.
The try...finally has a different semantics.
Fernando
> 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
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9