User: kyle wood Date: 17 Nov 23 06:30 Revision: ea703188248d9271027b1ac62cfaf0dfdb71a9cf Summary: Catch any exception when selecting a version URL TeamCity URL: http://ci.mcdev.io:80/viewModification.html?tab=vcsModificationFiles&modId=8828&personal=false Index: src/main/kotlin/creator/PlatformVersion.kt =================================================================== --- src/main/kotlin/creator/PlatformVersion.kt (revision ddb9af5e585b8974405a8c8db54ca9dc84397d4a) +++ src/main/kotlin/creator/PlatformVersion.kt (revision ea703188248d9271027b1ac62cfaf0dfdb71a9cf) @@ -25,7 +25,6 @@ import com.demonwav.mcdev.util.fromJson import com.demonwav.mcdev.util.mapFirstNotNull import com.demonwav.mcdev.util.withSuppressed -import com.github.kittinunf.fuel.core.FuelError import com.github.kittinunf.fuel.core.FuelManager import com.github.kittinunf.fuel.core.requests.suspendable import com.github.kittinunf.fuel.coroutines.awaitString @@ -77,11 +76,11 @@ } suspend fun getText(path: String): String { - var thrown: FuelError? = null + var thrown: Exception? = null return URLS.mapFirstNotNull { url -> try { doCall(url + path) - } catch (e: FuelError) { + } catch (e: Exception) { PLATFORM_VERSION_LOGGER.warn("Failed to reach URL $url$path") thrown = withSuppressed(thrown, e) null