[fpc-pascal] EAccessViolation on wrong exception re-raise: intended behavior?
leledumbo
leledumbo_cool at yahoo.co.id
Tue Mar 31 11:55:56 CEST 2015
Consider the following program:
{$mode objfpc}
uses sysutils;
begin
try
try
raise exception.create('test');
except
on e: exception do begin
e.message := 'tset';
raise e; // correct re-raise should only have raise; no exception
variable may present
end;
end;
except
writeln('oow');
end;
end.
which is a wrong way to re-raise an exception. The program runs but after
the outer exception handler ('oow'), it ends with EAccessViolation. Is this
the intended behavior?
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/EAccessViolation-on-wrong-exception-re-raise-intended-behavior-tp5721532.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal
mailing list