1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Adjusting error messages of line numbers to account for prototypes added to top of sketch.

This commit is contained in:
David A. Mellis 2006-03-21 11:08:26 +00:00
parent ac79978ff5
commit 71b23a6318

View File

@ -1407,7 +1407,7 @@ public class Sketch {
}
}
errorLine -= code[errorFile].preprocOffset;
//errorLine -= preprocessor.prototypeCount;
errorLine -= preprocessor.prototypeCount;
throw new RunnerException(re.getMessage(), errorFile,
errorLine, re.getColumn());
@ -1448,7 +1448,7 @@ public class Sketch {
}
}
errorLine -= code[errorFile].preprocOffset;
//errorLine -= preprocessor.prototypeCount;
errorLine -= preprocessor.prototypeCount;
throw new RunnerException(tsre.getMessage(),
errorFile, errorLine, errorColumn);
@ -1538,7 +1538,7 @@ public class Sketch {
} catch (RunnerException re) {
throw new RunnerException(re.getMessage(),
re.file,
re.line,// - preprocessor.prototypeCount,
re.line - preprocessor.prototypeCount,
re.column);
} catch (Exception ex) {
// TODO better method for handling this?