Scripting: script console gives wrong line number for script error

Bug #1046518 reported by Khalid AlAjaji
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Low
Alexander Wolf

Bug Description

If a script has an error, the script console message gives a wrong line number for the code line where the error is.

Example:
//

LandscapeMgr.setFlagLandscape(truie);
LandscapeMgr.setFlagAtmosphere(true);

Error in the 3rd line (truie)

The error message says: script error: "ReferenceError: Can't find variable: truie" @ line 5

The correct line number is always (the line number in the message + 1 )/2, in this case (5 + 1)/2=3

See also: http://sourceforge.net/projects/stellarium/forums/forum/278769/topic/5591465

Related branches

Revision history for this message
Alexander Wolf (alexwolf) wrote :
Changed in stellarium:
status: New → Fix Committed
importance: Undecided → Low
milestone: none → 0.12.0
assignee: nobody → Alexander Wolf (alexwolf)
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.