change exception type

This commit is contained in:
Maxence G 2021-05-25 19:30:02 +02:00
parent 070e0ac792
commit 3c4a5064b0
No known key found for this signature in database
GPG Key ID: DC1FD9409E3FE284
1 changed files with 5 additions and 4 deletions

View File

@ -29,6 +29,7 @@ import org.moire.ultrasonic.util.ErrorDialog
import org.moire.ultrasonic.util.ModalBackgroundTask
import org.moire.ultrasonic.util.Util
import timber.log.Timber
import java.io.IOException
/**
* Displays a form where server settings can be created / edited
@ -344,7 +345,7 @@ class EditServerFragment : Fragment(), OnBackPressedHandler {
currentServerSetting!!.chatSupport = try {
subsonicApiClient.api.getChatMessages().execute()
true
} catch (e: Throwable) { false }
} catch (e: IOException) { false }
updateProgress(
String.format(
@ -357,7 +358,7 @@ class EditServerFragment : Fragment(), OnBackPressedHandler {
currentServerSetting!!.bookmarkSupport = try {
subsonicApiClient.api.getBookmarks().execute()
true
} catch (e: Throwable) { false }
} catch (e: IOException) { false }
updateProgress(
String.format(
@ -371,7 +372,7 @@ class EditServerFragment : Fragment(), OnBackPressedHandler {
currentServerSetting!!.shareSupport = try {
subsonicApiClient.api.getShares().execute()
true
} catch (e: Throwable) { false }
} catch (e: IOException) { false }
updateProgress(
String.format(
@ -386,7 +387,7 @@ class EditServerFragment : Fragment(), OnBackPressedHandler {
currentServerSetting!!.podcastSupport = try {
subsonicApiClient.api.getPodcasts().execute()
true
} catch (e: Throwable) { false }
} catch (e: IOException) { false }
// Finalize String before displaying it to Dialog
progressString = String.format(