Log the file name when I/O fails
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user