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