Also log filename when loadFromDiskLocked failed

This would help to resolve the issue: now the user can look into that file and see what's inside an try to resolve the issue or fixing/cleaning up that file.
This commit is contained in:
binarynoise 2020-03-13 21:33:57 +01:00 committed by solohsu
parent d4aeddf5bc
commit 05178a7182
1 changed files with 2 additions and 2 deletions

View File

@ -128,11 +128,11 @@ public final class XSharedPreferences implements SharedPreferences {
map = mMap;
}
} catch (XmlPullParserException e) {
Log.w(TAG, "getSharedPreferences", e);
Log.w(TAG, "getSharedPreferences failed for: " + mFilename, e);
} catch (FileNotFoundException ignored) {
// SharedPreferencesImpl has a canRead() check, so it doesn't log anything in case the file doesn't exist
} catch (IOException e) {
Log.w(TAG, "getSharedPreferences", e);
Log.w(TAG, "getSharedPreferences failed for: " + mFilename, e);
} finally {
if (result != null && result.stream != null) {
try {