Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12840] [KrollObject invokeCallbackForKey] ignores exception

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2013-03-21T23:30:57.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterMatt Langston
AssigneeBlain Hamon
Created2013-02-24T16:15:19.000+0000
Updated2017-03-16T21:00:52.000+0000

Description

Blain discovered during his Kroll lecture on 2013.02.22 that [KrollObject invokeCallbackForKey] ignores the exception returned by TiObjectCallAsFunction (the final line of invokeCallbackForKey). The fix should be to pass this information to crittercism.

Comments

  1. Blain Hamon 2013-03-19

    https://github.com/appcelerator/titanium_mobile/pull/3984
  2. Matt Langston 2013-03-21

    Functional Test passed. The functional test consisted of:

    Create a Titanium Classic Default Project.

    Add the following code (copied from [Titanium.Network.HTTPClient](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Network.HTTPClient)) to the top of app.js, except that I added a "throw ..." statement to generate an event handler error.

    {noformat} var url = "http://www.appcelerator.com"; var client = Ti.Network.createHTTPClient({ // function called when the response data is available onload : function(e) { Ti.API.info("Received text: " + this.responseText); throw new String("generate error to test timob-12840"); alert('success'); }, // function called when an error occurs, including a timeout onerror : function(e) { Ti.API.debug(e.error); alert('error'); }, timeout : 5000 // in milliseconds }); {noformat}

    Run the app in iOS simulator and observe the expected "Application Error" red screen.

  3. Matt Langston 2013-03-21

    Functional Test passed - see previous comment for details.
  4. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source