Log the file name when I/O fails

This commit is contained in:
Luck committed 2017-01-23 21:15:25 +00:00
1 parent 98d6cf842a
commit f89fb87c92
2 files changed
+4

No files matched your search

@@ -91,6 +91,7 @@ public class JSONBacking extends FlatfileBacking {
}
}
} catch (Exception e) {
plugin.getLog().warn("Exception whilst writing to file: " + file.getAbsolutePath());
e.printStackTrace();
}
return success;
@@ -109,6 +110,7 @@ public class JSONBacking extends FlatfileBacking {
}
}
} catch (Exception e) {
plugin.getLog().warn("Exception whilst reading from file: " + file.getAbsolutePath());
e.printStackTrace();
}
return success;
@@ -95,6 +95,7 @@ public class YAMLBacking extends FlatfileBacking {
}
}
} catch (Throwable t) {
plugin.getLog().warn("Exception whilst writing to file: " + file.getAbsolutePath());
t.printStackTrace();
return false;
}
@@ -111,6 +112,7 @@ public class YAMLBacking extends FlatfileBacking {
}
}
} catch (Throwable t) {
plugin.getLog().warn("Exception whilst reading from file: " + file.getAbsolutePath());
t.printStackTrace();
}
return success;