Skip to content

Commit 2345d85

Browse files
committed
fix bug
1 parent 4586291 commit 2345d85

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/shuzijun/leetcode/plugin/editor/LCVPreview.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public LCVPreview(@NotNull Project project, @NotNull VirtualFile file) {
6868
tempPanel = new LCVPanel(url, project);
6969
tempPanel.loadHTML(createHtml(isPresentableUrl), url);
7070
myHtmlPanelWrapper.add(tempPanel.getComponent(), BorderLayout.CENTER);
71-
} catch (Exception e) {
72-
myHtmlPanelWrapper.add(new JBLabel(e.getMessage()), BorderLayout.CENTER);
71+
} catch (Throwable e) {
72+
myHtmlPanelWrapper.add(new JBLabel("<html><body>Your environment does not support JCEF.<br>Check the Registry 'ide.browser.jcef.enabled'.<br>"+e.getMessage()+"<body></html>"), BorderLayout.CENTER);
7373
}
7474
myPanel = tempPanel;
7575
myHtmlPanelWrapper.repaint();

src/main/java/com/shuzijun/leetcode/plugin/listener/SupportCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void runActivity(@NotNull Project project) {
2424
return;
2525
}
2626
if(!JBCefApp.isSupported()){
27-
Notifications.Bus.notify(new Notification(PluginConstant.NOTIFICATION_GROUP, "Not Support JCEF", "Your environment does not support JCEF, cannot use LeetCode Editor", NotificationType.ERROR));
27+
Notifications.Bus.notify(new Notification(PluginConstant.NOTIFICATION_GROUP, "Not Support JCEF", "Your environment does not support JCEF, cannot use LeetCode Editor.Check the Registry 'ide.browser.jcef.enabled'.", NotificationType.ERROR));
2828
}
2929
}
3030
}

0 commit comments

Comments
 (0)