diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-05-14 19:34:03 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-05-14 19:34:03 +0200 |
commit | d59415d8e46bea16c70a5b6819c46a8cc4139483 (patch) | |
tree | d69f4b724d570f87eca4d12c716302777da4805e /src/de/blinkt/openvpn/ProfileManager.java | |
parent | 08fb1d8c20604c25d1e6424e2dcb0d93d81a14e4 (diff) |
Add more error logging
Diffstat (limited to 'src/de/blinkt/openvpn/ProfileManager.java')
-rw-r--r-- | src/de/blinkt/openvpn/ProfileManager.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/de/blinkt/openvpn/ProfileManager.java b/src/de/blinkt/openvpn/ProfileManager.java index f8193003..d34bdbec 100644 --- a/src/de/blinkt/openvpn/ProfileManager.java +++ b/src/de/blinkt/openvpn/ProfileManager.java @@ -87,9 +87,12 @@ public class ProfileManager { } catch (FileNotFoundException e) { e.printStackTrace(); + throw new RuntimeException(e); } catch (IOException e) { e.printStackTrace(); + throw new RuntimeException(e); + } } @@ -98,6 +101,7 @@ public class ProfileManager { profiles = new HashMap<String, VpnProfile>(); SharedPreferences settings =context.getSharedPreferences(PREFS_NAME,Activity.MODE_PRIVATE); Set<String> vlist = settings.getStringSet("vpnlist", null); + Exception exp =null; if(vlist==null){ vlist = new HashSet<String>(); } @@ -110,13 +114,16 @@ public class ProfileManager { profiles.put(vp.getUUID().toString(), vp); } catch (StreamCorruptedException e) { - e.printStackTrace(); + exp=e; } catch (FileNotFoundException e) { - e.printStackTrace(); + exp=e; } catch (IOException e) { - e.printStackTrace(); + exp=e; } catch (ClassNotFoundException e) { - e.printStackTrace(); + exp=e; + } + if(exp!=null) { + exp.printStackTrace(); } } } |