[TIMOB-12840] [KrollObject invokeCallbackForKey] ignores exception
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-03-21T23:30:57.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Matt Langston |
Assignee | Blain Hamon |
Created | 2013-02-24T16:15:19.000+0000 |
Updated | 2017-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.
https://github.com/appcelerator/titanium_mobile/pull/3984
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.
Functional Test passed - see previous comment for details.
Closing ticket as fixed.