1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-02 13:24:12 +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 -= code[errorFile].preprocOffset;
//errorLine -= preprocessor.prototypeCount; errorLine -= preprocessor.prototypeCount;
throw new RunnerException(re.getMessage(), errorFile, throw new RunnerException(re.getMessage(), errorFile,
errorLine, re.getColumn()); errorLine, re.getColumn());
@ -1448,7 +1448,7 @@ public class Sketch {
} }
} }
errorLine -= code[errorFile].preprocOffset; errorLine -= code[errorFile].preprocOffset;
//errorLine -= preprocessor.prototypeCount; errorLine -= preprocessor.prototypeCount;
throw new RunnerException(tsre.getMessage(), throw new RunnerException(tsre.getMessage(),
errorFile, errorLine, errorColumn); errorFile, errorLine, errorColumn);
@ -1538,7 +1538,7 @@ public class Sketch {
} catch (RunnerException re) { } catch (RunnerException re) {
throw new RunnerException(re.getMessage(), throw new RunnerException(re.getMessage(),
re.file, re.file,
re.line,// - preprocessor.prototypeCount, re.line - preprocessor.prototypeCount,
re.column); re.column);
} catch (Exception ex) { } catch (Exception ex) {
// TODO better method for handling this? // TODO better method for handling this?