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

Throwing a non-Error object in a script run by QJSEngine is not reported to the C++ API as an error

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.6.0, 5.7.0, 6.x
    • None
    • 0056a8d9e10e83157c3974ec1475ac1f96fb9cde (qt/qtdeclarative/dev)

    Description

      Suppose I have a `QJSEngine`. I run some JavaScript through this, and it throws something. This something is not an `Error`; it's anyone's guess as to what it actually is. It's reported as a plain old return value, and then I can't tell whether or not a weird exception was thrown.

      This is a problem because I'm making a programming game where the user writes their own scripts; I can't guarantee that no one won't try to do a `throw 5;` to see what happens.

      Attachments

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              JesseTG Jesse Talavera-Greenberg
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes