1 2 3 4 5 6 7 8
var result = ""; o = { valueOf:function(){ throw "cow" } }; try { String.fromCharCode(o); } catch (e) { result = e.toString(); } assertEq(result, "cow");