Subj : exit evaluateReader for javascript? To : netscape.public.mozilla.jseng From : jeff Date : Tue Aug 23 2005 11:09 pm I have a java program that uses Rhino to load and run javascripts. The app 'puts' a few objects into the script scope, letting scripters script application behavior. The app executes the script by opening a FileReader and calling 'evaluateReader' on the Rhino context. Thing is, I'd like scripters to be able to EXIT the script in the middle. Something like: // ------------------------- if ( foo < bar) exit(-1); else { doSomethingElse(); } Questions: 1. Is there a polite way to do this? 2. Are there any intrinsic objects/methods to let me do this? Thanks in advance, Jeff .