Hi
Is it possible to get the line number of the code in which an error occurs with the following system?
try {
.......
............
.........
}
catch (e) {
EAction.handleUserMessage ("");
EAction.handleUserMessage ("Start error tracking");
EAction.handleUserMessage (e.name);
EAction.handleUserMessage (e.Message);
EAction.handleUserMessage ("Error:" + e);
EAction.handleUserMessage (e.fileName);
EAction.handleUserMessage ("End tracking Error");
EAction.handleUserMessage ("");
}
Get the line number of an error
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Full Member
- Posts: 81
- Joined: Fri Apr 17, 2015 6:40 am
- Location: http://creativitainformaticart.altervista.org
Re: Get the line number of an error
You could use multiple try / catch blocks to narrow down the location.
Or leave away the try / catch and let the script debugger tell you where the error is (start QCAD with -enable-script-debugger).
Or leave away the try / catch and let the script debugger tell you where the error is (start QCAD with -enable-script-debugger).
-
- Full Member
- Posts: 81
- Joined: Fri Apr 17, 2015 6:40 am
- Location: http://creativitainformaticart.altervista.org
Re: Get the line number of an error
Thanks, I tried using .../qcadcam-3.20.1-pro-linux-x86_64/qcad" "-always-load-scripts" "-enable-script-debugger" "-rescan", but after the third continues the program turns off
- Attachments
-
- QCAD_debugger_Istantanea_2019-12-13_08-01-53.png (262.49 KiB) Viewed 3969 times