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>
This commit is contained in:
parent
240e049e46
commit
87c9efce4a
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user