bug fix for .NET 4.6: exit in except block caused runtime error
This commit is contained in:
parent
cce539f4a0
commit
540394db13
|
|
@ -10290,7 +10290,10 @@ namespace PascalABCCompiler.NETGenerator
|
|||
{
|
||||
if (!ExitProcedureCall)
|
||||
ExitLabel = il.DefineLabel();
|
||||
il.Emit(OpCodes.Br, ExitLabel);
|
||||
if (!safe_block)
|
||||
il.Emit(OpCodes.Br, ExitLabel);
|
||||
else
|
||||
il.Emit(OpCodes.Leave, ExitLabel);
|
||||
ExitProcedureCall = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1964,7 +1964,7 @@ begin
|
|||
on e: System.Exception do
|
||||
begin
|
||||
Result := nil;
|
||||
Exit;
|
||||
//Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Reference in a new issue