Is there a way to obtain current line number in executing Qt Script, using objects and functions in it?
Asked
Active
Viewed 518 times
2 Answers
0
var lineNumber = 1;
try {
unexsistedVariable1 + unexsistedVariable2; //we have got number of this line
}
catch(e) {
lineNumber = e.lineNumber;
}

Sacha_D
- 68
- 1
- 10
0
Use the __LINE__
int constant, which will be filled when you compile the code.

Bob Van de Vijver
- 2,224
- 2
- 14
- 11