Skip to content

Instantly share code, notes, and snippets.

@caisui
Created January 11, 2012 11:44
Show Gist options
  • Save caisui/1594308 to your computer and use it in GitHub Desktop.
Save caisui/1594308 to your computer and use it in GitHub Desktop.
var a = {
__noSuchMethod__: function () {c++;}
};
var e = [];
var c = 0;
for (var i = 0; i < 100; i++) {
try {
a.b();
} catch (ex) {
e.push([i, ex.message]);
}
}
e.push(c);
alert(e);
@caisui
Copy link
Author

caisui commented Jan 12, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment