mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:49:33 +02:00
Increase status.errorcount only inside GenerateError procedure, to simplify debugging
git-svn-id: trunk@23398 -
This commit is contained in:
parent
235bda8746
commit
6d8b1e03d7
@ -79,7 +79,10 @@ type
|
||||
currentmodulestate : string[20];
|
||||
{ Total Status }
|
||||
compiledlines : longint; { the number of lines which are compiled }
|
||||
errorcount,
|
||||
errorcount, { this field should never be increased directly,
|
||||
use Verbose.GenerateError procedure to do this,
|
||||
this allows easier error catching using GDB by
|
||||
adding a single breakpoint at this procedure }
|
||||
countWarnings,
|
||||
countNotes,
|
||||
countHints : longint; { number of found errors/warnings/notes/hints }
|
||||
|
@ -359,8 +359,9 @@ implementation
|
||||
on Exception do
|
||||
begin
|
||||
{ Increase errorcounter to prevent some
|
||||
checks during cleanup }
|
||||
inc(status.errorcount);
|
||||
checks during cleanup,
|
||||
but use GenerateError procedure for this. }
|
||||
GenerateError;
|
||||
raise;
|
||||
end;
|
||||
end;
|
||||
|
@ -569,7 +569,7 @@ implementation
|
||||
begin
|
||||
UpdateStatus;
|
||||
do_internalerror(i);
|
||||
inc(status.errorcount);
|
||||
GenerateError;
|
||||
raise ECompilerAbort.Create;
|
||||
end;
|
||||
|
||||
@ -584,7 +584,7 @@ implementation
|
||||
(status.errorwarning and ((l and V_Warning)<>0)) or
|
||||
(status.errornote and ((l and V_Note)<>0)) or
|
||||
(status.errorhint and ((l and V_Hint)<>0)) then
|
||||
inc(status.errorcount)
|
||||
GenerateError
|
||||
else
|
||||
if l and V_Warning <> 0 then
|
||||
inc(status.countWarnings)
|
||||
@ -652,7 +652,7 @@ implementation
|
||||
'F' :
|
||||
begin
|
||||
v:=v or V_Fatal;
|
||||
inc(status.errorcount);
|
||||
GenerateError;
|
||||
dostop:=true;
|
||||
end;
|
||||
'E','W','N','H':
|
||||
@ -666,7 +666,7 @@ implementation
|
||||
if st=ms_error then
|
||||
begin
|
||||
v:=v or V_Error;
|
||||
inc(status.errorcount);
|
||||
GenerateError;
|
||||
end
|
||||
else if st<>ms_off then
|
||||
case ch of
|
||||
@ -675,7 +675,7 @@ implementation
|
||||
v:=v or V_Warning;
|
||||
if CheckVerbosity(V_Warning) then
|
||||
if status.errorwarning then
|
||||
inc(status.errorcount)
|
||||
GenerateError
|
||||
else
|
||||
inc(status.countWarnings);
|
||||
end;
|
||||
@ -684,7 +684,7 @@ implementation
|
||||
v:=v or V_Note;
|
||||
if CheckVerbosity(V_Note) then
|
||||
if status.errornote then
|
||||
inc(status.errorcount)
|
||||
GenerateError
|
||||
else
|
||||
inc(status.countNotes);
|
||||
end;
|
||||
@ -693,7 +693,7 @@ implementation
|
||||
v:=v or V_Hint;
|
||||
if CheckVerbosity(V_Hint) then
|
||||
if status.errorhint then
|
||||
inc(status.errorcount)
|
||||
GenerateError
|
||||
else
|
||||
inc(status.countHints);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user