Fixed more System.exit(1) InterruptedExceptions

This commit is contained in:
Vhati 2017-12-07 13:43:49 -05:00
parent 8a934027f1
commit 2ed948468b
2 changed files with 22 additions and 13 deletions

View file

@ -56,7 +56,10 @@ public class FTLModManager {
String currentPath = new File( "." ).getAbsoluteFile().getParentFile().getAbsolutePath();
showErrorDialog( String.format( "Slipstream could not find its own folder.\nCurrently in: %s\n\nRun one of the following instead of the jar...\nWindows: modman.exe or modman_admin.exe\nLinux/OSX: modman.command or modman-cli.sh\n\nThe Mod Manager will now exit.", currentPath ) );
System.err.println( String.format( "Slipstream could not find its own folder (Currently in \"%s\"), exiting.", currentPath ) );
System.exit( 1 );
System.gc();
// System.exit( 1 ); // Don't do this (InterruptedException). Let EDT end gracefully.
return;
}
@ -148,7 +151,10 @@ public class FTLModManager {
if ( datsDir == null ) {
showErrorDialog( "FTL resources were not found.\nThe Mod Manager will now exit." );
log.debug( "No FTL dats path found, exiting." );
System.exit( 1 );
System.gc();
// System.exit( 1 ); // Don't do this (InterruptedException). Let EDT end gracefully.
return;
}
// Prompt if update_catalog is invalid or hasn't been set.
@ -199,7 +205,10 @@ public class FTLModManager {
}
catch ( Exception e ) {
log.error( "Exception while creating ManagerFrame.", e );
System.exit(1);
System.gc();
// System.exit( 1 ); // Don't do this (InterruptedException). Let EDT end gracefully.
return;
}
}

View file

@ -288,7 +288,7 @@ public class ManagerFrame extends JFrame implements ActionListener, ModsScanObse
}
System.gc();
//System.exit( 0 ); // Don't interrupt lingering non-daemon threads.
//System.exit( 0 ); // Don't do this (InterruptedException). Let EDT end gracefully.
}
});