Use general_e_exception_raised if Compiler generates an uncaught exception

git-svn-id: trunk@31801 -
This commit is contained in:
pierre 2015-09-23 16:49:24 +00:00
parent 6524e536fa
commit 7e348a40a3
3 changed files with 16 additions and 5 deletions

View File

@ -370,7 +370,13 @@ begin
{ in case of 50 errors, this could cause another exception,
suppress this exception
}
Message(general_f_compilation_aborted);
if not exception_raised then
begin
exception_raised:=true;
Message(general_e_exception_raised);
end
else
Message(general_f_compilation_aborted);
except
on ECompilerAbort do
;

View File

@ -303,6 +303,7 @@ interface
nwcopyright : string;
codegenerror : boolean; { true if there is an error reported }
exception_raised : boolean; { true if there is an exception reported }
block_type : tblock_type; { type of currently parsed block }

View File

@ -394,10 +394,14 @@ implementation
raise;
on Exception do
begin
{ Increase errorcounter to prevent some
checks during cleanup,
but use GenerateError procedure for this. }
GenerateError;
{ Generate exception_raised message,
but avoid multiple messages by
guarding with exception_raised global variable }
if not exception_raised then
begin
exception_raised:=true;
Message(general_e_exception_raised);
end;
raise;
end;
end;