handle JavaScript exceptions when called from Java

XMLWordPrintable

    • web

      Various methods in the JavaScript bridge API ignore JavaScript exceptions. This is probably not a good idea.
      We should probably throw a Java exception.
      The implementation looks like it would be simple - the tricky part is the desig: how to map the JavaScript exception value to a Java exception.

      What seems reasonable to me is to define a new exception class which should extend netscape.javascript.JSException,
      since the latter is already used in some of the APIs. The JavaScript exception value would be converted to a Java value (in the usual way) and stored in the JSException. There would be a method to get the value. We also want to make sure that getMessage and toString yield reasonable values, based on the JavaScript exception value.

            Assignee:
            Per Bothner (Inactive)
            Reporter:
            Per Bothner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:

                Estimated:
                Original Estimate - 3 days
                3d
                Remaining:
                Remaining Estimate - 3 days
                3d
                Logged:
                Time Spent - Not Specified
                Not Specified