I\'ve got a single threaded app that should set the DOS errorlevel to something non-zero if there is a problem. Is it better to throw a RuntimeException, or to use System.ex
System.exit(num) is not a good option, as its shutdown JVM, plus even it didnt run the finally block if you have after catch block.
Throwing RuntimeException also might not be the best of the option, can subclass as mentioned earlier which is app specific exception could be a better option in my opinion. -Manish