runelite-client: improve error message when injected client is not found on the classpath

This commit is contained in:
Adam
2017-11-11 11:21:05 -05:00
parent f4922169f4
commit feddece684
2 changed files with 15 additions and 3 deletions

View File

@@ -68,7 +68,18 @@ final class ClientPanel extends JPanel
else else
{ {
logger.debug("Runelite is up to date"); logger.debug("Runelite is up to date");
rs = loader.loadRunelite();
try
{
rs = loader.loadRunelite();
}
catch (ClassNotFoundException ex)
{
logger.error("Unable to load client - class not found. This means you"
+ " are not running RuneLite with Maven as the injected client"
+ " is not in your classpath.");
throw new ClassNotFoundException("Unable to load injected client", ex);
}
} }
rs.setLayout(null); rs.setLayout(null);
@@ -87,7 +98,7 @@ final class ClientPanel extends JPanel
if (!(rs instanceof Client)) if (!(rs instanceof Client))
{ {
logger.error("Injected client does not implement Client!"); logger.error("Injected client does not implement Client!");
System.exit(-1); return;
} }
Client client = (Client) rs; Client client = (Client) rs;

View File

@@ -95,7 +95,8 @@ public final class ClientUI extends JFrame
} }
catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException ex) catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException ex)
{ {
logger.warn("Error loading RS!", ex); logger.error("Error loading RS!", ex);
System.exit(-1);
} }
} }
container.add(panel, BorderLayout.CENTER); container.add(panel, BorderLayout.CENTER);