Let's say I have the following code:
try { //Do something with File } catch (FileNotFoundException e) { outputInfo("Error in IO Redirection", true); e.printStackTrace(); System.exit(1); }
My program exits immediately after this catch location, it is a program with one thread (one main method) and should not expect recovery from such an exception.
Should I use System.exit(1); ?
source share