mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-17 08:01:24 +00:00
Add recognition of fatal errors
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37829 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1d906ebdf1
commit
d52982ba41
2 changed files with 18 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-05-03 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Framework/PCProjectBuilder.m
|
||||
Add recognition of fatal errors.
|
||||
|
||||
2014-04-08 German Arias <germanandre@gmx.es>
|
||||
|
||||
* Modules/Editors/ProjectCenter/PCEditorView.m (-insertText:): Add a
|
||||
|
|
|
@ -920,7 +920,7 @@
|
|||
NSString *pathComponent;
|
||||
NSString *path;
|
||||
|
||||
// NSLog(@"parseMakeLine: %@", lineString);
|
||||
// NSLog(@"parseMakeLine: %@", lineString);
|
||||
|
||||
makeLineComponents = [NSMutableArray
|
||||
arrayWithArray:[lineString componentsSeparatedByString:@" "]];
|
||||
|
@ -1097,13 +1097,13 @@
|
|||
forKey:NSUnderlineStyleAttributeName];
|
||||
|
||||
lastEL = currentEL;
|
||||
|
||||
// NSLog(@"error string: %@", string);
|
||||
/* if (lastEL == ELFile) NSLog(@"+++ELFile");
|
||||
if (lastEL == ELFunction) NSLog(@"+++ELFunction");
|
||||
if (lastEL == ELIncluded) NSLog(@"+++ELIncluded");
|
||||
if (lastEL == ELError) NSLog(@"+++ELError");
|
||||
if (lastEL == ELNone) NSLog(@"+++ELNone");*/
|
||||
|
||||
// NSLog(@"components: %lu, %@", (unsigned long)[components count], components);
|
||||
if ([errorArray count] > 0)
|
||||
{
|
||||
lastFile = [[errorArray lastObject] objectForKey:@"File"];
|
||||
|
@ -1148,6 +1148,7 @@
|
|||
}
|
||||
|
||||
// type
|
||||
typeIndex = NSNotFound;
|
||||
if ((typeIndex = [components indexOfObject:@" warning"]) != NSNotFound)
|
||||
{
|
||||
type = [components objectAtIndex:typeIndex];
|
||||
|
@ -1158,12 +1159,20 @@
|
|||
type = [components objectAtIndex:typeIndex];
|
||||
errorsCount++;
|
||||
}
|
||||
else if ((typeIndex = [components indexOfObject:@" fatal error"]) != NSNotFound)
|
||||
{
|
||||
type = [components objectAtIndex:typeIndex];
|
||||
errorsCount++;
|
||||
}
|
||||
|
||||
// NSLog(@"typeIndex: %u", (unsigned int)typeIndex);
|
||||
// position
|
||||
if (typeIndex == 2) // :line:
|
||||
{
|
||||
int lInt = atoi([[components objectAtIndex:1] cString]);
|
||||
NSNumber *lNumber = [NSNumber numberWithInt:lInt];
|
||||
|
||||
// NSLog(@"type 2, parsed l: %i", lInt);
|
||||
position = [NSString stringWithFormat:@"{x=%i; y=0}",
|
||||
[lNumber intValue]];
|
||||
}
|
||||
|
@ -1174,6 +1183,7 @@
|
|||
NSNumber *lNumber = [NSNumber numberWithInt:lInt];
|
||||
NSNumber *cNumber = [NSNumber numberWithInt:cInt];
|
||||
|
||||
// NSLog(@"type 3, parsed l,c: %i, %i", lInt, cInt);
|
||||
position = [NSString stringWithFormat:@"{x=%i; y=%i}",
|
||||
[lNumber intValue], [cNumber intValue]];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue