CShell
CShell copied to clipboard
Line number shown in errors does not correspond to actual error location
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
Could you provide the code you were running when you hit the issue?
yes this references the actual place in the scripting engine where your code is executed. We should actually not show this line!