diff --git a/designer-base/src/main/java/com/fr/exit/DesignerExiter.java b/designer-base/src/main/java/com/fr/exit/DesignerExiter.java index 7337ff7c74..3acb3cf8a9 100644 --- a/designer-base/src/main/java/com/fr/exit/DesignerExiter.java +++ b/designer-base/src/main/java/com/fr/exit/DesignerExiter.java @@ -35,7 +35,12 @@ public class DesignerExiter { public void exit(Throwable throwable) { FineLoggerFactory.getLogger().error(throwable.getMessage(), throwable); + + StartErrorMessageCollector.getInstance().record(DesignerErrorMessage.UNEXCEPTED_START_FAILED.getId(), + DesignerErrorMessage.UNEXCEPTED_START_FAILED.getMessage(), + throwable.getMessage()); + // 尝试进行检测 List results = EnvDetectorCenter.getInstance().terminate(throwable); if (Collections.isEmpty(results)) { @@ -53,9 +58,7 @@ public class DesignerExiter { } private void showOldExitDialog(Throwable throwable) { - StartErrorMessageCollector.getInstance().record(DesignerErrorMessage.UNEXCEPTED_START_FAILED.getId(), - DesignerErrorMessage.UNEXCEPTED_START_FAILED.getMessage(), - throwable.getMessage()); + ErrorDialog dialog = new ErrorDialog(null, Toolkit.i18nText("Fine-Design_Error_Start_Apology_Message"), Toolkit.i18nText("Fine-Design_Error_Start_Report"), throwable.getMessage()) { diff --git a/designer-realize/src/main/java/com/fr/start/LifecycleFatalErrorHandler.java b/designer-realize/src/main/java/com/fr/start/LifecycleFatalErrorHandler.java index e4c5d73f91..37f608ee16 100644 --- a/designer-realize/src/main/java/com/fr/start/LifecycleFatalErrorHandler.java +++ b/designer-realize/src/main/java/com/fr/start/LifecycleFatalErrorHandler.java @@ -6,7 +6,6 @@ import com.fr.design.dialog.FineJOptionPane; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.messagecollect.StartErrorMessageCollector; import com.fr.design.mainframe.messagecollect.entity.DesignerErrorMessage; -import com.fr.env.detect.EnvDetectorCenter; import com.fr.env.detect.base.DetectorBridge; import com.fr.env.detect.bean.DetectorResult; import com.fr.env.detect.bean.DetectorStatus; @@ -153,8 +152,8 @@ public class LifecycleFatalErrorHandler { SELF { @Override public void handle(FineLifecycleFatalError fatal) { - - EnvDetectorCenter.getInstance().terminate(fatal); + + DesignerExiter.getInstance().exit(fatal); } } }