On Mon, Dec 1, 2008 at 6:30 AM, Kris Zyp <[EMAIL PROTECTED]> wrote:
> Is this what you want?:
>
> try{
> doSomething();
> }
> catch(e if e instanceof Error){
> handleError(e);
> }
Kris and Norris, thanks.
What is that extension called? Is it strictly Rhino only?
One advantage of what I was thinking below was that the reraise
function could be extracted to a separate file and do something
rhino-specific. In a non-rhino environment, reraise could simply throw
the exception and not preserve the stack trace (unless there was some
way to preserve the stack trace in another environment.)
try {
doSomething();
}
catch (e) {
if (e instanceOf MyError) {
handleError(e);
}
else {
reraise(e);
}
}
Thanks,
Peter
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino