Subj : How do I raise an exception? To : Thomas Sondergaard From : Rob Swindell Date : Tue Aug 02 2005 03:25 pm Re: How do I raise an exception? By: Thomas Sondergaard to netscape.public.mozilla.jseng on Tue Aug 02 2005 11:29 am > It seems that returning JS_FALSE from a JSNative c-function just results > in an error. How do I raise an exception? Preferably of type Error. > > I've found some prior posts that seems to indicate that JS_ReportError > should do this, but doesn't because of a bug. I use JS_ReportError and it seems to work fine. Example: if((p=(private_t*)malloc(sizeof(private_t)))==NULL) { JS_ReportError(cx,"malloc failed"); return(JS_FALSE); } digital man Snapple "Real Fact" #188: Antarctica is the driest, coldest, windiest, and highest continent on earth. .