mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 13:09:16 +02:00
Use general_e_exception_raised if Compiler generates an uncaught exception
git-svn-id: trunk@31801 -
This commit is contained in:
parent
6524e536fa
commit
7e348a40a3
@ -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
|
||||
;
|
||||
|
@ -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 }
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user