Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45878

QJSEngine::evaluate documentation could have an example how to get properties of an error object

    XMLWordPrintable

Details

    • aa1524a4dde5098da2c9e40eb60bbaecf69bbe1c

    Description

      Properties lineNumber, message and fileName could be queried from returned value. Those do not seem to be documented anywhere.
      http://doc.qt.io/qt-5/qjsengine.html#evaluate

      For example:

      QJSvalue error = ..
      qDebug() << v.property("fileName").toString() << v.property("lineNumber").toInt() << v.property("message").toString();
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            docteam Qt Documentation Team
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes