lots of fixes to error handling

This commit is contained in:
benfry
2005-05-07 01:08:07 +00:00
parent 2d8fc4d6c9
commit ff378d2242
8 changed files with 99 additions and 50 deletions
+2 -2
View File
@@ -260,14 +260,14 @@ public class Compiler implements MessageConsumer {
if (fileIndex == 0) { // main class, figure out which tab
for (int i = 1; i < sketch.codeCount; i++) {
if (sketch.code[i].flavor == Sketch.PDE) {
if (sketch.code[i].lineOffset < lineNumber) {
if (sketch.code[i].preprocOffset < lineNumber) {
fileIndex = i;
//System.out.println("i'm thinkin file " + i);
}
}
}
if (fileIndex != 0) { // if found another culprit
lineNumber -= sketch.code[fileIndex].lineOffset;
lineNumber -= sketch.code[fileIndex].preprocOffset;
//System.out.println("i'm sayin line " + lineNumber);
}
}