2. Catch VirtualMachineError so on out-of-memory/stack-overflow the shell will exit with System.exit(EXITCODE_RUNTIME_ERROR), not with 1. It will allow to distinguish cases when script tried to consume all available stack/memory with bugs in Rhino itself leading to NullPointerException etc. 3. Remove code to rethrow ThreadDeath from JavaScriptExcception since ThreadDeath is re-thrown by the engine itself. git-svn-id: svn://10.0.0.236/trunk@144504 18797224-902f-48f8-a5cc-f745e15eee43