IDE: messages: show all compiler messages beginning with a time stamp

git-svn-id: trunk@20169 -
This commit is contained in:
mattias 2009-05-24 12:00:59 +00:00
parent 3854d50417
commit 90b6e6e5a5
2 changed files with 22 additions and 4 deletions

View File

@ -787,6 +787,10 @@ begin
while (i<=length(s)) and (s[i] in ['0'..'9','.']) do inc(i);
if (i<=length(s)) and (s[i]=']') then inc(i);
while (i<=length(s)) and (s[i] in [' ']) do inc(i);
// the user enabled extreme verbosity
// show all
DoAddFilteredLine(Copy(s, i, length(s)));
exit(true);
end;
// check for 'Compiling <filename>'

View File

@ -313,22 +313,36 @@ function ParseFPCMessage(const Line: string; out Filename: string; out
<filename>(456) <ErrorType>: <some text> in line (123)
Fatal: <some text>
}
var StartPos, EndPos: integer;
var
StartPos, EndPos: integer;
begin
Result:=false;
if copy(Line,1,7)='Fatal: ' then begin
StartPos:=1;
// skip time [0.000]
if (Line<>'') and (Line[StartPos]='[') then begin
inc(StartPos);
while (StartPos<=length(Line)) and (Line[StartPos] in ['0'..'9','.']) do
inc(StartPos);
if (StartPos<=length(Line)) and (Line[StartPos]=']') then
inc(StartPos);
while (StartPos<=length(Line)) and (Line[StartPos] in [' ']) do
inc(StartPos);
end;
if copy(Line,StartPos,7)='Fatal: ' then begin
Result:=true;
Filename:='';
MsgType:=etFatal;
exit;
end;
if copy(Line,1,7)='Panic: ' then begin
if copy(Line,StartPos,7)='Panic: ' then begin
Result:=true;
Filename:='';
MsgType:=etPanic;
exit;
end;
StartPos:=1;
// find filename
EndPos:=StartPos;
while (EndPos<=length(Line)) and (Line[EndPos]<>'(') do inc(EndPos);