Subj : Re: [SpiderMonkey] Strange Lack of Knowledge for DefineFunction To : Brian Barnes From : Brendan Eich Date : Thu Apr 29 2004 11:04 pm Brian Barnes wrote: > I've been using this engine heavily for about 2 years and I just > realized there's something real simple I don't know, and I can't find > the answer in the docs ... > > If I define a function in an object (JS_DefineFunctions), I always end > the C version by returning JS_TRUE. What happens if I did JS_FALSE? I > tried, it doesn't seem to make a difference! It does, but the JS shell hides the silent error. Returning false means the function failed, and should have either reported an error, or thrown an exception. /be .