浏览代码

improved error logging

Sebastian Stenzel 6 年之前
父节点
当前提交
f909f384be
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      main/commons/src/main/java/org/cryptomator/common/settings/SettingsProvider.java

+ 2 - 1
main/commons/src/main/java/org/cryptomator/common/settings/SettingsProvider.java

@@ -10,6 +10,7 @@ package org.cryptomator.common.settings;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
+import com.google.gson.JsonParseException;
 import org.cryptomator.common.Environment;
 import org.cryptomator.common.LazyInitializer;
 import org.slf4j.Logger;
@@ -117,7 +118,7 @@ public class SettingsProvider implements Provider<Settings> {
 			}
 			Files.move(tmpPath, settingsPath, StandardCopyOption.REPLACE_EXISTING);
 			LOG.info("Settings saved to {}", settingsPath);
-		} catch (IOException e) {
+		} catch (IOException | JsonParseException e) {
 			LOG.error("Failed to save settings.", e);
 		}
 	}