Change warning text if cannot connect to jupyter

This commit is contained in:
Valentina Kiryushkina
2017-02-06 17:21:16 +03:00
parent 8d84e47e58
commit b613bf3d36
@@ -308,8 +308,9 @@ public final class IpnbConnectionManager implements ProjectComponent {
if (message.startsWith(IpnbConnection.UNABLE_LOGIN_MESSAGE)) {
showWarning(codePanel.getFileEditor(), "Cannot connect to Jupyter Notebook: login failed", new IpnbSettingsAdapter());
}
else if(message.startsWith(CONNECTION_REFUSED)) {
showWarning(codePanel.getFileEditor(), "Cannot connect to Jupyter Notebook: connection refused", new IpnbSettingsAdapter());
else if (message.startsWith(CONNECTION_REFUSED) || message.startsWith(IpnbConnection.CANNOT_START_JUPYTER)) {
showWarning(codePanel.getFileEditor(), "Cannot connect to Jupyter Notebook: cannot connect to Jupyter server",
new IpnbSettingsAdapter());
}
LOG.warn("Jupyter Notebook connection refused: " + message);