no message
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package Common.Utils;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Database;
|
||||
import Common.Database.VisualiserDatabase;
|
||||
import Common.Mode;
|
||||
import Common_old.Current;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
@@ -23,6 +24,11 @@ import java.util.concurrent.Semaphore;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.stream.Collectors;
|
||||
public class CommonUtils {
|
||||
//Режим
|
||||
public static Mode mode= Mode.Undefined;
|
||||
public static boolean hasUI() {
|
||||
return mode.equals(Mode.Normal);
|
||||
}
|
||||
//Текущая оперционная система
|
||||
public static boolean isWindows=true;
|
||||
//Домашняя папка.
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
package Common.Utils;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.DebugPrintLevel;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -42,7 +40,7 @@ public interface Loggable {
|
||||
ex.printStackTrace(writer);
|
||||
writer.flush();
|
||||
Print(out.toString());
|
||||
if (Current.hasUI())
|
||||
if (CommonUtils.hasUI())
|
||||
UI.Error("Возникло исключение. Подробности в файле журнала\n" +
|
||||
CommonUtils.Brackets(getLogFile().getAbsolutePath()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user