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:
parent
ac79978ff5
commit
71b23a6318
@ -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?
|
||||||
|
Loading…
Reference in New Issue
Block a user