summaryrefslogtreecommitdiffhomepage
path: root/ui/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-19 13:01:51 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-19 13:05:53 -0600
commit87c9efce4a65cee0f48bc944048609c7b385de79 (patch)
tree673faab48f1a3f2d11b59e0a76542ab6940a9331 /ui/src
parent240e049e46f630fef5b1317e2ceb66604497a81f (diff)
TunnelListFragment: catch all parsing exceptions
Otherwise we crash if weird things happen. Reported-by: Luis Ressel <aranea@aixah.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src')
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt5
1 files changed, 1 insertions, 4 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt
index 78c98161..cb3636fe 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt
+++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt
@@ -62,10 +62,7 @@ class TunnelListFragment : BaseFragment() {
// Config text is valid, now create the tunnel…
newInstance(configText).show(parentFragmentManager, null)
} catch (e: Exception) {
- when(e) {
- is BadConfigException, is IOException -> onTunnelImportFinished(emptyList(), listOf<Throwable>(e))
- else -> throw e
- }
+ onTunnelImportFinished(emptyList(), listOf<Throwable>(e))
}
}