From 3861e7ca35718c65a5bc5973a32871e364293cef Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Sat, 29 Sep 2012 07:53:34 -0700 Subject: [PATCH] Log NumberFormatExceptions. Fix whitespace. --- src/com/fsck/k9/preferences/Storage.java | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/com/fsck/k9/preferences/Storage.java b/src/com/fsck/k9/preferences/Storage.java index f1210d84e..e4a624847 100644 --- a/src/com/fsck/k9/preferences/Storage.java +++ b/src/com/fsck/k9/preferences/Storage.java @@ -321,9 +321,10 @@ public class Storage implements SharedPreferences { if (val == null) { return defValue; } - try{ - return Float.parseFloat(val); - } catch (NumberFormatException nfe){ + try { + return Float.parseFloat(val); + } catch (NumberFormatException nfe) { + Log.e(K9.LOG_TAG, "Could not parse float", nfe); return defValue; } } @@ -335,8 +336,9 @@ public class Storage implements SharedPreferences { return defValue; } try { - return Integer.parseInt(val); - } catch (NumberFormatException nfe){ + return Integer.parseInt(val); + } catch (NumberFormatException nfe) { + Log.e(K9.LOG_TAG, "Could not parse int", nfe); return defValue; } } @@ -347,10 +349,11 @@ public class Storage implements SharedPreferences { if (val == null) { return defValue; } - try{ - return Long.parseLong(val); - } catch (NumberFormatException nfe){ - return defValue; + try { + return Long.parseLong(val); + } catch (NumberFormatException nfe) { + Log.e(K9.LOG_TAG, "Could not parse long", nfe); + return defValue; } }