mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 13:09:17 +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];
|
currentmodulestate : string[20];
|
||||||
{ Total Status }
|
{ Total Status }
|
||||||
compiledlines : longint; { the number of lines which are compiled }
|
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,
|
countWarnings,
|
||||||
countNotes,
|
countNotes,
|
||||||
countHints : longint; { number of found errors/warnings/notes/hints }
|
countHints : longint; { number of found errors/warnings/notes/hints }
|
||||||
|
@ -359,8 +359,9 @@ implementation
|
|||||||
on Exception do
|
on Exception do
|
||||||
begin
|
begin
|
||||||
{ Increase errorcounter to prevent some
|
{ Increase errorcounter to prevent some
|
||||||
checks during cleanup }
|
checks during cleanup,
|
||||||
inc(status.errorcount);
|
but use GenerateError procedure for this. }
|
||||||
|
GenerateError;
|
||||||
raise;
|
raise;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -569,7 +569,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
UpdateStatus;
|
UpdateStatus;
|
||||||
do_internalerror(i);
|
do_internalerror(i);
|
||||||
inc(status.errorcount);
|
GenerateError;
|
||||||
raise ECompilerAbort.Create;
|
raise ECompilerAbort.Create;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -584,7 +584,7 @@ implementation
|
|||||||
(status.errorwarning and ((l and V_Warning)<>0)) or
|
(status.errorwarning and ((l and V_Warning)<>0)) or
|
||||||
(status.errornote and ((l and V_Note)<>0)) or
|
(status.errornote and ((l and V_Note)<>0)) or
|
||||||
(status.errorhint and ((l and V_Hint)<>0)) then
|
(status.errorhint and ((l and V_Hint)<>0)) then
|
||||||
inc(status.errorcount)
|
GenerateError
|
||||||
else
|
else
|
||||||
if l and V_Warning <> 0 then
|
if l and V_Warning <> 0 then
|
||||||
inc(status.countWarnings)
|
inc(status.countWarnings)
|
||||||
@ -652,7 +652,7 @@ implementation
|
|||||||
'F' :
|
'F' :
|
||||||
begin
|
begin
|
||||||
v:=v or V_Fatal;
|
v:=v or V_Fatal;
|
||||||
inc(status.errorcount);
|
GenerateError;
|
||||||
dostop:=true;
|
dostop:=true;
|
||||||
end;
|
end;
|
||||||
'E','W','N','H':
|
'E','W','N','H':
|
||||||
@ -666,7 +666,7 @@ implementation
|
|||||||
if st=ms_error then
|
if st=ms_error then
|
||||||
begin
|
begin
|
||||||
v:=v or V_Error;
|
v:=v or V_Error;
|
||||||
inc(status.errorcount);
|
GenerateError;
|
||||||
end
|
end
|
||||||
else if st<>ms_off then
|
else if st<>ms_off then
|
||||||
case ch of
|
case ch of
|
||||||
@ -675,7 +675,7 @@ implementation
|
|||||||
v:=v or V_Warning;
|
v:=v or V_Warning;
|
||||||
if CheckVerbosity(V_Warning) then
|
if CheckVerbosity(V_Warning) then
|
||||||
if status.errorwarning then
|
if status.errorwarning then
|
||||||
inc(status.errorcount)
|
GenerateError
|
||||||
else
|
else
|
||||||
inc(status.countWarnings);
|
inc(status.countWarnings);
|
||||||
end;
|
end;
|
||||||
@ -684,7 +684,7 @@ implementation
|
|||||||
v:=v or V_Note;
|
v:=v or V_Note;
|
||||||
if CheckVerbosity(V_Note) then
|
if CheckVerbosity(V_Note) then
|
||||||
if status.errornote then
|
if status.errornote then
|
||||||
inc(status.errorcount)
|
GenerateError
|
||||||
else
|
else
|
||||||
inc(status.countNotes);
|
inc(status.countNotes);
|
||||||
end;
|
end;
|
||||||
@ -693,7 +693,7 @@ implementation
|
|||||||
v:=v or V_Hint;
|
v:=v or V_Hint;
|
||||||
if CheckVerbosity(V_Hint) then
|
if CheckVerbosity(V_Hint) then
|
||||||
if status.errorhint then
|
if status.errorhint then
|
||||||
inc(status.errorcount)
|
GenerateError
|
||||||
else
|
else
|
||||||
inc(status.countHints);
|
inc(status.countHints);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user