From a5097256d24d54471ee88d30ec906da6b4d9721a Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 7 Aug 2018 17:24:35 +0800 Subject: [PATCH] . --- .../java/com/fr/design/actions/file/SwitchExistEnv.java | 6 +++++- .../java/com/fr/design/env/DesignerWorkspaceGenerator.java | 2 +- .../main/java/com/fr/design/mainframe/TemplatePane.java | 7 +++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java b/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java index 6a5d4e4b34..0386937cb3 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java @@ -13,6 +13,8 @@ import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; import com.fr.design.menu.SeparatorDef; import com.fr.design.utils.DesignUtils; +import com.fr.license.exception.RegistEditionException; +import com.fr.log.FineLoggerFactory; import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContextCallback; import com.fr.workspace.Workspace; @@ -114,9 +116,11 @@ public class SwitchExistEnv extends MenuDef { } catch (AuthException exception) { JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Basic_Remote_Connect_Auth_Failed"), null, 0, UIManager.getIcon("OptionPane.errorIcon")); - } catch (RemoteDesignVT4FRException e1) { + } catch (RegistEditionException exception) { JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Lic_does_not_Support_Remote"), null, 0, UIManager.getIcon("OptionPane.errorIcon")); + } catch (Exception exception) { + FineLoggerFactory.getLogger().error(exception.getMessage(), exception); } } } diff --git a/designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java b/designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java index cff9f413cc..fc5783b10d 100644 --- a/designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java +++ b/designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java @@ -11,7 +11,7 @@ import com.fr.workspace.connect.WorkspaceClient; */ public class DesignerWorkspaceGenerator { - public static Workspace generate(DesignerWorkspaceInfo config) throws AuthException, RemoteDesignVT4FRException { + public static Workspace generate(DesignerWorkspaceInfo config) throws Exception { if (config == null || config.getType() == null) { return null; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/TemplatePane.java b/designer-base/src/main/java/com/fr/design/mainframe/TemplatePane.java index 66d25f7bcc..8f1a389740 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/TemplatePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/TemplatePane.java @@ -15,12 +15,13 @@ import com.fr.design.utils.DesignUtils; import com.fr.env.EnvListPane; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; +import com.fr.license.exception.RegistEditionException; +import com.fr.log.FineLoggerFactory; import com.fr.stable.EnvChangedListener; import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContextCallback; import com.fr.workspace.Workspace; import com.fr.workspace.connect.AuthException; -import com.fr.workspace.connect.RemoteDesignVT4FRException; import javax.swing.BorderFactory; import javax.swing.Icon; @@ -168,9 +169,11 @@ public class TemplatePane extends JPanel implements MouseListener { JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Basic_Remote_Connect_Auth_Failed"), null, 0, UIManager.getIcon("OptionPane.errorIcon")); return false; - } catch (RemoteDesignVT4FRException e) { + } catch (RegistEditionException e) { JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("FR-Lic_does_not_Support_Remote"), null, 0, UIManager.getIcon("OptionPane.errorIcon")); + } catch (Exception exception) { + FineLoggerFactory.getLogger().error(exception.getMessage(), exception); } TemplateTreePane.getInstance().refreshDockingView(); DesignModelAdapter model = DesignModelAdapter.getCurrentModelAdapter();