why does my JScript (windows script host) exit with 0 on an uncaught exception?

why does my JScript (windows script host) exit with 0 on an uncaught exception?

I have some JScript which does some stuff with an ODBC connection. An exception was thrown by the ODBC ActiveXObject object and not caught in my script. I expected that the script would exit with an non 0 value but it didn't. Anyone know why this is the case and how to get it to exit with a non 0 value on an uncaught exception?

Zend_Controller_Router_Exception: “xyz” is not specified


what happens to a python object when you throw an exception from it
The JScript engine can be thought of as a virtual machine.

Why IllegalArgumentException (JDK 1.4.2) cannot be constructed with a throwable cause?
If the JScript engine itself or the script host were to have some form of catastrophic failure you could expect to get a non zero exit code (for example an the script host couldn't find one of the DLLs it needs)..
Unexpected value in Exception object in catch block (c# compact framework)
However if the script program being run on this 'VM' throws an exception even an unhandled one that does not constitute a failure in the engine or the host..
what this error means? [Erlang, mochiweb, MySQL]
What you can do is place the whole script in a try block and then just throw the exception in the catch.

Why are so many errors “AccessViolationException”s?
The scripting engine will handle this thrown exception exactly as you wanted the original handled:-.
What is the difference between throw and throw with arg of caught exception?
try {    // the rest of your script  } catch(e) {   throw(e);  // returns nonzero exit code } 

java rmi exceptions

70 out of 100 based on 70 user ratings 670 reviews