Log errors in client.init, and capture with sentry if rsps isn't on (#1985)
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.ui;
|
package net.runelite.client.ui;
|
||||||
|
|
||||||
|
import io.sentry.Sentry;
|
||||||
import java.applet.Applet;
|
import java.applet.Applet;
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
@@ -60,11 +61,22 @@ final class ClientPanel extends JPanel
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
String message = "Detected a bad codebase. Resetting...\n"
|
if (RuneLite.allowPrivateServer)
|
||||||
+ "Please restart client.\n";
|
{
|
||||||
JOptionPane.showMessageDialog(new JFrame(), message, "Bad Codebase",
|
String message = "Detected a bad codebase. Resetting...\n"
|
||||||
JOptionPane.ERROR_MESSAGE);
|
+ "Please restart client.\n";
|
||||||
StringFileUtils.writeStringToFile(RuneLite.RUNELITE_DIR + "/codebase", "http://127.0.0.1/");
|
JOptionPane.showMessageDialog(new JFrame(), message, "Bad Codebase",
|
||||||
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
StringFileUtils.writeStringToFile(RuneLite.RUNELITE_DIR + "/codebase", "http://127.0.0.1/");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
JOptionPane.showMessageDialog(new JFrame(), "Error loading Oldschool RuneScape!", "Error",
|
||||||
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
Sentry.capture(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
((Client) client).getLogger().error(null, e);
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
client.start();
|
client.start();
|
||||||
|
|||||||
Reference in New Issue
Block a user