From 8787bbcd766afc3ec197cb6fb3a503d694b06a88 Mon Sep 17 00:00:00 2001 From: y9vad9 Date: Tue, 27 Feb 2024 15:18:54 +0100 Subject: [PATCH] fix: `@Throws on suspend declaration must have CancellationException` --- .../org/timemates/sdk/common/pagination/PagesIterator.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/src/commonMain/kotlin/org/timemates/sdk/common/pagination/PagesIterator.kt b/sdk/src/commonMain/kotlin/org/timemates/sdk/common/pagination/PagesIterator.kt index caa5484..5c42c70 100644 --- a/sdk/src/commonMain/kotlin/org/timemates/sdk/common/pagination/PagesIterator.kt +++ b/sdk/src/commonMain/kotlin/org/timemates/sdk/common/pagination/PagesIterator.kt @@ -1,5 +1,6 @@ package org.timemates.sdk.common.pagination +import kotlinx.coroutines.CancellationException import org.timemates.sdk.common.annotations.ApiStatus import org.timemates.sdk.common.annotations.ExperimentalTimeMatesApi import org.timemates.sdk.common.constructor.createOrThrow @@ -38,7 +39,7 @@ public interface PagesIterator { * @return The list of elements in the next page. * @throws NoSuchElementException if there are no more pages available. */ - @Throws(NoSuchElementException::class) + @Throws(NoSuchElementException::class, CancellationException::class) public suspend operator fun next(): Result> /**