display Mac users a helpful message about -XstartOnFirstThread requirement if they are trying to run ipscan themselves

This commit is contained in:
Anton Keks 2021-02-15 21:04:21 +02:00
parent 83ec424143
commit 27e3dbd269

View File

@ -32,7 +32,11 @@ public class GUI implements AutoCloseable {
}
catch (SWTError e) {
if (e.getMessage().contains("gtk_init_check")) {
System.err.println(e.toString() + " - probably you are running as `root` and/or don't have access to the X Server. Please run as normal user or with sudo.");
System.err.println(e.toString() + ": probably you are running as `root` and/or don't have access to the X Server. Please run as normal user or with sudo.");
new GoogleAnalytics().report(e);
}
else if (e.getMessage().contains("Invalid thread access")) {
System.err.println(e.toString() + ": you need to start Java with -XstartOnFirstThread on a Mac");
new GoogleAnalytics().report(e);
}
else throw e;