From d59415d8e46bea16c70a5b6819c46a8cc4139483 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 14 May 2012 19:34:03 +0200 Subject: Add more error logging --- src/de/blinkt/openvpn/ProfileManager.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/de/blinkt/openvpn/ProfileManager.java') 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(); SharedPreferences settings =context.getSharedPreferences(PREFS_NAME,Activity.MODE_PRIVATE); Set vlist = settings.getStringSet("vpnlist", null); + Exception exp =null; if(vlist==null){ vlist = new HashSet(); } @@ -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(); } } } -- cgit v1.2.3