Wrong line number in callstack
Bug Description
The callstack in case of error or whereami
return the wrong line number.
--> whereami()
whereami called at line -11 of exec_file
exec called at line 2 of macro test
test called at line 17 of exec_file
Steps to reproduce
Create a file that defines a function and uses exec
to call another file.
Add the above code at line 12 of the file.
// add some empty lines before the function
function test()
exec wrong_line.sce
end
test()
Create the wrong_line.sce
file and add the following code inside.
whereami()
What is the expected correct behavior?
--> whereami()
whereami called at line 1 of exec_file
exec called at line 2 of macro test
test called at line 17 of exec_file
Change the call of whereami()
by an error to see the same problem in the callstack.