ios-jsc: Call global onUncaughtError callback when a NSException occurs

var arr = NSArray.array();
var obj = arr[3]; // A NSException is raised

global.__onUncaughtError = function (e) {
    // This should be called
}

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 21 (19 by maintainers)

Most upvoted comments

@atanasovg @fealebenpae

Here are the results after adding try/catch in each call on top of our current master branch:

32-bit iPhone 5 with iOS 7

Test Master Exceptions
Primitives 2552ms - 2666ms 2928ms - 2944ms
Strings 801ms - 805ms 796ms - 812ms
Big data 13138ms - 13196ms 13054ms - 13204ms

64-bit iPhone 5s with iOS 8

Test Master Exceptions
Primitives 988ms - 998ms 1038ms - 1047ms
Strings 481ms - 489ms 469ms - 477ms
Big data 1200ms - 1206ms 1192ms - 1204ms

There seem to be no significant differences, except for the Primitives test (calling a method one million times) on 32-bit platforms.