Subj : Re: Rhino: Try/Catch problem To : ramirez From : Igor Bukanov Date : Fri May 14 2004 07:08 pm Edwin S. Ramirez wrote: > I think that there is a bug in catching some errors in a try/catch > block. Look at the code below: > > function crash(b) { > var a, str, num; > a = b['x']; // NOT caught > //str = 'x'; a = b[str]; // NOT caught > //a = b[1]; // caught, ok > //num = 1; a = b[num]; // caught, ok > //a = b.x; // caught, ok > } > > function testcatch() { > try { > crash(null); > writeln('no error'); > } catch (e) { > writeln('error: '+e); > } > } > > testcatch() Which version of Rhino do you use? The above example with suitably defined writeln works for me. Igor .