what I mean by this exception is ok is it has he same meaning as the type error from 1.5R5. It is still a the problem.
On Thu, Feb 21, 2008 at 9:23 AM, Anupama Joshi <[EMAIL PROTECTED]> wrote: > I use 1.6R5. > But I had tried it with the latest. This exception is ok. If you remove > the try-catch in the JS you wont get it. > Thanks > -Anupama > > > On Thu, Feb 21, 2008 at 9:17 AM, Ruland Kevin-BHP637 <[EMAIL PROTECTED]> > wrote: > > > Anupama > > > > What version of Rhino are you using? When I use 1.7R1-RC3, I get an > > Illegal argument exception when accessing 'this.count'. > > > > Kevin > > > > ------------------------------ > > *From:* Anupama Joshi [mailto:[EMAIL PROTECTED] > > *Sent:* Thu 2/21/2008 9:22 AM > > *To:* Ruland Kevin-BHP637 > > > > *Subject:* Re: try -catch problem > > > > pl. try again for this one. > > > > On Thu, Feb 21, 2008 at 6:24 AM, Ruland Kevin-BHP637 < > > [EMAIL PROTECTED]> wrote: > > > > > > > > Anupama, > > > > > > I couldn't open the zip file. > > > > > > Kevin > > > > > > ------------------------------ > > > *From:* [EMAIL PROTECTED] on behalf > > > of Anupama Joshi > > > *Sent:* Thu 2/21/2008 1:30 AM > > > *To:* Attila Szegedi > > > *Cc:* [email protected] > > > *Subject:* Re: try -catch problem > > > > > > Hi , > > > Attached is the zip file for the self contained test case. > > > Counter.java containsa method (function) resetCount. > > > When this function is called from the javascript inside a try-catch > > > block , > > > the script throws error - TypeError: Method "resetCount" called on > > > incompatible object. > > > If the try catch block is removed it works fine. > > > pl. let me know if you can not access the zip file. > > > Thanks > > > -Anupama > > > > > > On Fri, Feb 15, 2008 at 11:53 AM, Attila Szegedi <[EMAIL PROTECTED]> > > > wrote: > > > > > > > First off, your example is syntactically incorrect. In JavaScript, > > > the > > > > catch syntax is: > > > > > > > > catch(e) { > > > > } > > > > > > > > not > > > > > > > > catch(exeption e) { > > > > } > > > > > > > > Actually, even in Java you'd use "Exception" (capital "E", and with > > > a > > > > "c" after "x"), not "exeption". > > > > > > > > I have no idea what's wrong, and would need a self-contained > > > > reproducible testcase (with all objects available). Can you produce > > > > one? Are you using interpreted or compiled mode? > > > > > > > > Attila. > > > > > > > > On 2008.02.15., at 19:26, Rhino user wrote: > > > > > > > > > I am posting this message again. Sorry about that . Just to make > > > sure > > > > > that it gets read. > > > > > > > > > > Also , I tried this with the latest RC build which Norris posted > > > > > yesterday .The message is slightly different but the problem > > > remains. > > > > > Hi , > > > > > I have a script like his > > > > > try{ > > > > > var f = this.getOCGS(); > > > > > } > > > > > > > > > > catch(exeption e){ > > > > > logger.println(e);; > > > > > > > > > > } > > > > > > > > > > logger is equivalent of System.out in java. > > > > > I have a scriptable object Doc which is the toplevel object > > > referred > > > > > to as this. > > > > > The getOCGs() method throws a runtime exception . So I would > > > expect > > > > > that the system.out will print that error but instaed it throws an > > > > > error saying that > > > > > TypeError: Method "getOCGs" called on incompatible object. > > > > > If I remove the try- catch block the right error gets thrown. > > > > > what can be wrong? > > > > > Thanks > > > > > > > > > > > > > > > > > > > > > > > >
_______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
