client: show error dialog when unable to load client
This commit is contained in:
@@ -211,7 +211,6 @@ public class ClientLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.error("Error loading RS!", e);
|
log.error("Error loading RS!", e);
|
||||||
System.exit(-1);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ import javax.swing.JButton;
|
|||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
|
import static javax.swing.JOptionPane.ERROR_MESSAGE;
|
||||||
import static javax.swing.JOptionPane.INFORMATION_MESSAGE;
|
import static javax.swing.JOptionPane.INFORMATION_MESSAGE;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JRootPane;
|
import javax.swing.JRootPane;
|
||||||
@@ -510,8 +511,14 @@ public class ClientUI
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Show out of date dialog if needed
|
// Show out of date dialog if needed
|
||||||
final boolean isOutdated = !(client instanceof Client);
|
if (client == null)
|
||||||
if (isOutdated)
|
{
|
||||||
|
SwingUtilities.invokeLater(() -> JOptionPane.showMessageDialog(frame,
|
||||||
|
"Error loading client! Check your logs for more details.",
|
||||||
|
"Unable to load client",
|
||||||
|
ERROR_MESSAGE));
|
||||||
|
}
|
||||||
|
else if (!(client instanceof Client))
|
||||||
{
|
{
|
||||||
SwingUtilities.invokeLater(() -> JOptionPane.showMessageDialog(frame,
|
SwingUtilities.invokeLater(() -> JOptionPane.showMessageDialog(frame,
|
||||||
"RuneLite has not yet been updated to work with the latest\n"
|
"RuneLite has not yet been updated to work with the latest\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user