diff options
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java index 0385d1e..8d99a64 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java @@ -387,6 +387,7 @@ final class SettingsState { } catch (Throwable t) { Slog.wtf(LOG_TAG, "Failed to write settings, restoring backup", t); destination.failWrite(out); + throw new IllegalStateException("Failed to write settings, restoring backup", t); } finally { IoUtils.closeQuietly(out); } @@ -408,10 +409,9 @@ final class SettingsState { parser.setInput(in, null); parseStateLocked(parser); - // Any error while parsing is fatal. - } catch (Throwable t) { + } catch (XmlPullParserException | IOException e) { throw new IllegalStateException("Failed parsing settings file: " - + mStatePersistFile , t); + + mStatePersistFile , e); } finally { IoUtils.closeQuietly(in); } |