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