forked from External/mage
added additional logging + keep session alive for most connection errors
This commit is contained in:
parent
0dff1ac743
commit
b9eac322d2
4 changed files with 13 additions and 7 deletions
|
|
@ -705,11 +705,15 @@ public class Session {
|
|||
}
|
||||
|
||||
private void handleRemoteException(RemoteException ex) {
|
||||
server = null;
|
||||
logger.log(Level.SEVERE, "Connection to server lost", ex);
|
||||
frame.setStatusText("Not connected");
|
||||
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Connection to server lost.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
frame.disableButtons();
|
||||
logger.log(Level.SEVERE, "Communication error", ex);
|
||||
if (ex instanceof java.rmi.ConnectException) {
|
||||
server = null;
|
||||
frame.setStatusText("Not connected");
|
||||
frame.disableButtons();
|
||||
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Communication error - disconnecting.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
else
|
||||
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Communication error.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
|
||||
private void handleMageException(MageException ex) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue