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
1 changed files with 3 additions and 3 deletions

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?