Added line number and column to exception thrown in Factor()
authorMichael Welch <michaelgwelch@gmail.com>
Thu, 28 Dec 2006 22:30:01 +0000 (22:30 +0000)
committerMichael Welch <michaelgwelch@gmail.com>
Thu, 28 Dec 2006 22:30:01 +0000 (22:30 +0000)
mbasic/Parser.cs

index 97af243..34ef484 100644 (file)
@@ -378,7 +378,9 @@ namespace mbasic
                 case Token.Minus:
                     return UnaryMinus();
                 default: 
-                    throw new Exception("No Factor detected");
+                    throw new Exception(
+                        String.Format("No Factor detected label {0}, column {1}",
+                        lexer.LineId.Label, lexer.Column));
             }
         }