Subj : Re: Supressing errors? To : netscape.public.mozilla.jseng From : Brian Genisio Date : Mon Feb 02 2004 07:30 am Brendan Eich wrote: > Brian Genisio wrote: > >> >>> Why do you want to suppress errors? Users who make mistakes, obvious >>> or subtle, will be left scratching their heads. With >>> try/catch/finally exception handling in JS and ECMA for many years >>> now, it seems to me much better to give the user some signal that >>> something is amiss. >>> >>> /be >> >> >> >> Only because I am writing something that will act as closely like IE >> as possible... > > > > Really? Which version(s) of IE? Can you show a short HTML testcase? > > /be Sure :) IE v6.0 XP sp2 /////////////////////////////////////////////////////// var myText = document.createTextNode("THIS IS A TEST"); alert(myText.substringData(window, 4)); /////////////////////////////////////////////////////// The DOMTextData method of substringData takes two integers. If I send in the object of DOMWindow, it defaults to the integer of 0. The example given will print "THIS". Of course, when I implement the interface for this method, and do a JS_ValueToInt32, it fails. I can use the default of 0 in this case. When that the conversion fails, I want to supress the error, because IE does not show an error either. Like I mentioned earlier, I can do other types of checks, and I already override the error handler, so I have solutions for this, but I guess I was wondering if there was an API way to surpress an error type... Or, it is possible that I am doing something wrong still :) Thanks, Brian .