mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
try writing the crash info to file as well on mac, becase notification center cuts the whole message
This commit is contained in:
parent
ff5bf7f738
commit
04d65a45f5
@ -12,6 +12,8 @@ import net.azib.ipscan.gui.InfoDialog;
|
||||
import net.azib.ipscan.gui.MacApplicationMenu;
|
||||
import net.azib.ipscan.util.GoogleAnalytics;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.security.Security;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Logger;
|
||||
@ -88,6 +90,8 @@ public class Main {
|
||||
|
||||
private static void showFallbackError(String message) {
|
||||
try {
|
||||
System.err.println(message);
|
||||
try { Files.writeString(File.createTempFile("ipscan-crash-", ".txt").toPath(), message); } catch (Exception ignore) {}
|
||||
if (Platform.MAC_OS)
|
||||
Runtime.getRuntime().exec(new String[] {"osascript", "-e", "display notification \"" + message + "\" with title \"Angry IP Scanner\""});
|
||||
else
|
||||
@ -96,7 +100,6 @@ public class Main {
|
||||
}
|
||||
catch (Exception e) {
|
||||
System.err.println(e);
|
||||
System.err.println(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user