Request synchronization error with SUSPEND inside two exceptions handling blocks (specific and common) [CORE3410] #1323
Labels
affect-version: 1.5.6
affect-version: 2.0.4
affect-version: 2.0.5
affect-version: 2.0.6
affect-version: 2.1.0
affect-version: 2.1.1
affect-version: 2.1.2
affect-version: 2.1.3
affect-version: 2.1.4
affect-version: 2.5.0
affect-version: 2.5.1
affect-version: 3.0 Alpha 1
affect-version: 3.0 Initial
priority: major
type: bug
Submitted by: Vladimir Arkhipov (arkinform)
Votes: 2
The following simple procedure works fine and returns 'Error3'.
create or alter procedure TEST
returns
(
error_text varchar(1024)
)
as
begin
in autonomous transaction do
begin
exception error 'Error1';
end
when exception error do
begin
error_text = 'Error3';
suspend;
end
end
But if I add extra handling "when any do" to the end of procedure, then request synchronization error occurs.
create or alter procedure TEST
returns
(
error_text varchar(1024)
)
as
begin
in autonomous transaction do
begin
exception error 'Error1';
end
when exception error do
begin
error_text = 'Error3';
suspend;
end
when any do
begin
error_text = 'Error4';
suspend;
end
end
May be usage of exception handling in autonomous transaction block is wrong in principle?!
But in some cases it is needed for rollback all autonomous actions and receive information about state from transactional context variables, for example.
The text was updated successfully, but these errors were encountered: