CShell icon indicating copy to clipboard operation
CShell copied to clipboard

Line number shown in errors does not correspond to actual error location

Open radimt opened this issue 10 years ago • 2 comments

Here is an example of an error generated by running code with total of 69 lines. Note how the error message is indicating line 170 as error location.

System.ArgumentOutOfRangeException: StartIndex cannot be less than zero. Parameter name: startIndex at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) at <InteractiveExpressionClass>.Host(Object& $retval) at Mono.CSharp.Evaluator.Evaluate(String input, Object& result, Boolean& result_set) at CShell.ScriptingEngine.Evaluate(String input, String sourceFile) in c:\Users\Luke\Dev\GitHub\CShell\Src\CShellCore\ScriptingEngine.cs:line 170

radimt avatar Jul 01 '14 18:07 radimt

Could you provide the code you were running when you hit the issue?

medmondson avatar Jul 08 '14 22:07 medmondson

yes this references the actual place in the scripting engine where your code is executed. We should actually not show this line!

lukebuehler avatar Sep 12 '14 18:09 lukebuehler