From 71b23a63184bd3e2d2c49ff0ee9bc7b1d3d8daf5 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Tue, 21 Mar 2006 11:08:26 +0000 Subject: [PATCH] Adjusting error messages of line numbers to account for prototypes added to top of sketch. --- app/Sketch.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Sketch.java b/app/Sketch.java index bacb8aa0c..19521bf7d 100644 --- a/app/Sketch.java +++ b/app/Sketch.java @@ -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?