Skip to content

Commit

Permalink
catch all exceptions in one block
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Yiu authored and Tim Yiu committed Sep 26, 2023
1 parent 9b3bf40 commit 6316fab
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,7 @@ internal class DefaultExperimentClient internal constructor(
val variants = parseResponse(response)
future.complete(variants)
} catch (e: Exception) {
when (e) {
is IOException -> onFailure(call, e)
is JSONException -> future.completeExceptionally(e)
}
future.completeExceptionally(e)
}
}

Expand Down

0 comments on commit 6316fab

Please sign in to comment.