Log the file name when I/O fails

This commit is contained in:
Luck 2017-01-23 21:15:25 +00:00
parent 98d6cf842a
commit f89fb87c92
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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;