Subj : Re: Error handling To : netscape.public.mozilla.jseng From : "Sterling Bates" Date : Wed Aug 06 2003 12:22 am "Braden McDaniel" wrote in message news:pan.2003.08.06.04.38.44.904586@endoframe.com... > On Tue, 05 Aug 2003 22:21:49 -0600, Sterling Bates wrote: > > > > > "Braden McDaniel" wrote in message > > news:pan.2003.08.06.03.24.44.95906@endoframe.com... > >> > >> Well, frozen or not, JS_ReportErrorNumber is broken for its intended > >> purpose: the pattern of usage employed in js.c is not valid. Perhaps its > >> signature could be changed to > >> > >> void JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback, > >> void * userRef, JSErrNum errorNumber, ...); > > > > Regarding the "...", I would advocate against the use of more > > variant-parameter functions. There are already several of them, notably all > > of the JS_*Arguments functions. Other languages may not support this > > (Delphi/Object Pascal is one of them) and this could be a very crucial API. > > > > If it's important to have the "...", then perhaps I can work up a Delphi > > routine to append (prepend?) arguments to the call stack. I'm not sure > > exactly how C implements it, but the info is probably out there. > > These comments really don't take into account the context of my suggestion > (i.e., the rest of the thread). I'm not sure that my comment _would_ dependent on the context :) You may have put the "..." in to indicate "the rest of the existing signature" rather than "variant-parameter API". In that case, I apologize, I misunderstood your comment. If it is what you were suggesting, I'm merely advocating against the use of variant-parameter APIs. Whatever the context may be. (And seeing how quickly Brendan is able to make these changes, I figured it's important to voice an opinion quickly .) Sterling .