Subject Re: [firebird-support] Exception question
Author Dan Wilson
> If I have code something like:

> begin
> insert into mytable values ('a');
> execute procedure xx; /* xx might throw exception */
> when any do
> begin
> ...
> end
> end!!

> and sproc 'xx' does throw an exception, will it automatically undo
> actions performed in 'xx' even though the exception is being handled
> one block up?

> Would it undo the 'insert...'?

if the actions in your exception code include a transaction rollback, then everything in the transaction context will be undone, including the insert. Note that actions outside of transaction scope, such as generator increments, will not be undone. It all depends on what you decide to do in your exception code.