mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-08 01:43:59 +07:00
Crash reporting fixes
This commit is contained in:
parent
afec65eb56
commit
bab8120814
@ -85,7 +85,7 @@ public class CrashHandler{
|
||||
|
||||
try{
|
||||
Path path = Paths.get(OS.getAppDataDirectoryString(Vars.appName), "crashes",
|
||||
"crash-report-" + DateTimeFormatter.ofPattern("MM-dd-yyyy-HH:mm:ss").format(LocalDateTime.now()) + ".txt");
|
||||
"crash-report-" + DateTimeFormatter.ofPattern("MM dd yyyy HH mm ss").format(LocalDateTime.now()) + ".txt");
|
||||
Files.createDirectories(Paths.get(OS.getAppDataDirectoryString(Vars.appName), "crashes"));
|
||||
|
||||
Files.write(path, parseException(e).getBytes());
|
||||
@ -117,7 +117,7 @@ public class CrashHandler{
|
||||
StringWriter sw = new StringWriter();
|
||||
PrintWriter pw = new PrintWriter(sw);
|
||||
e.printStackTrace(pw);
|
||||
return sw.toString().replace(e.getMessage(), e.getMessage().replace(System.getProperty("user.name"), "[USERNAME]"));
|
||||
return sw.toString();
|
||||
}
|
||||
|
||||
private static void ex(Runnable r){
|
||||
|
Loading…
Reference in New Issue
Block a user