From 2df2279455cd89e0de4f132449f38cbb050d76e7 Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Thu, 6 Sep 2018 12:11:48 -0700 Subject: [PATCH] interface styles plugin: Add more error handling If a file is expected but not found, an IllegalArgumentException will be thrown as a result of `null` being passed to the `ImageIO.read` call. This commit adds better logging for this error case. --- .../client/plugins/interfacestyles/InterfaceStylesPlugin.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesPlugin.java index 62da02d02a..afccecf6d5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesPlugin.java @@ -194,6 +194,10 @@ public class InterfaceStylesPlugin extends Plugin { log.debug("Unable to load image: ", ex); } + catch (IllegalArgumentException ex) + { + log.debug("Input stream of file path " + filePath + " could not be read: ", ex); + } return null; }