Is there a script mode to get the position of the line where an error occurs?

Discussion forum for contributors and developers who are using the QCAD ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Post Reply
pietro_72_
Active Member
Posts: 34
Joined: Fri Apr 17, 2015 6:40 am
Location: http://creativitainformaticart.altervista.org

Is there a script mode to get the position of the line where an error occurs?

Post by pietro_72_ » Sat Aug 26, 2017 6:22 pm

Hello

Is there a script mode to get the position of the line where an error occurs?

With this code:
    try {
        .........
        .........
    }
    Catch (e) {
      EAction.handleUserMessage ( "");
      EAction.handleUserMessage ("Error Start Tracking");
      EAction.handleUserMessage (e.name);
      EAction.handleUserMessage (e.Message);
      EAction.handleUserMessage ("Error:" + e);
      EAction.handleUserMessage (e.fileName);
      EAction.handleUserMessage ("Fine tracing error");
      EAction.handleUserMessage ( "");
      }
        .........
        .........
   
I've been able to get these results:
        .........
        .........
     
     Error starting tracking
     TypeError
     Result of expression 'this.data3D [id] [numVertex]' [undefined] is not an object.
     Error: TypeError: Result of expression 'this.data3D [id] [numVertex]' [undefined] is not an object.
     scripts / Misc / MiscDraw / OrthogonalProjections / OrthogonalProjections.js
     Fine tracing error

        .........
        .........


But I did not find any kind of property ...... (e.lineNumber); Returning the line number, is there some way?

Post Reply

Return to “QCAD Developers and Contributors”