mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Fix compat error by continuing the throw from Java's fileReader class
This commit is contained in:
parent
4fa8fff3db
commit
feaf21c702
@ -149,18 +149,10 @@ public class Iris extends VolmitPlugin
|
|||||||
public void onEnable()
|
public void onEnable()
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
if (!new File("compat.json").exists()) {
|
|
||||||
msg("Creating Compat file");
|
|
||||||
try {
|
|
||||||
new File("compat.json").createNewFile();
|
|
||||||
} catch (IOException e) {
|
|
||||||
msg("Could not forcefully initiate Compat");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
compat = IrisCompat.configured(getDataFile("compat.json"));
|
compat = IrisCompat.configured(getDataFile("compat.json"));
|
||||||
} catch (Exception e) {
|
} catch (IOException e){
|
||||||
msg("Could not find Compat file despite forceful initiation");
|
// Do nothing. Everything continues properly but the exception is still there.
|
||||||
}
|
}
|
||||||
proj = new ProjectManager();
|
proj = new ProjectManager();
|
||||||
convert = new ConversionManager();
|
convert = new ConversionManager();
|
||||||
|
@ -149,7 +149,7 @@ public class IrisCompat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IrisCompat configured(File f)
|
public static IrisCompat configured(File f) throws IOException
|
||||||
{
|
{
|
||||||
IrisCompat def = new IrisCompat();
|
IrisCompat def = new IrisCompat();
|
||||||
String defa = new JSONObject(new Gson().toJson(def)).toString(4);
|
String defa = new JSONObject(new Gson().toJson(def)).toString(4);
|
||||||
@ -174,11 +174,13 @@ public class IrisCompat
|
|||||||
def.getItemFilters().add(i);
|
def.getItemFilters().add(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(JsonSyntaxException e)
|
||||||
catch(JsonSyntaxException | IOException e)
|
|
||||||
{
|
{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
catch(IOException e){
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
@ -410,7 +410,7 @@ public class IO
|
|||||||
try {
|
try {
|
||||||
fr = new FileReader(f);
|
fr = new FileReader(f);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new IOException(e);
|
throw e;
|
||||||
}
|
}
|
||||||
BufferedReader bu = new BufferedReader(fr);
|
BufferedReader bu = new BufferedReader(fr);
|
||||||
String c = "";
|
String c = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user