File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
store/src/commonMain/kotlin/org/mobilenativefoundation/store/store5 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ sealed class StoreReadResponse<out Output> {
7575 fun requireData (): Output {
7676 return when (this ) {
7777 is Data -> value
78- is Error -> throw this .doThrow ()
78+ is Error -> throw this .asThrowable ()
7979 else -> throw NullPointerException (" there is no data in $this " )
8080 }
8181 }
@@ -86,7 +86,7 @@ sealed class StoreReadResponse<out Output> {
8686 */
8787 fun throwIfError () {
8888 if (this is Error ) {
89- throw this .doThrow ()
89+ throw this .asThrowable ()
9090 }
9191 }
9292
@@ -165,7 +165,7 @@ sealed class StoreReadResponseOrigin {
165165 object Initial : StoreReadResponseOrigin()
166166}
167167
168- fun StoreReadResponse.Error.doThrow (): Throwable {
168+ fun StoreReadResponse.Error.asThrowable (): Throwable {
169169 return when (this ) {
170170 is StoreReadResponse .Error .Exception -> error
171171 is StoreReadResponse .Error .Message -> RuntimeException (message)
You can’t perform that action at this time.
0 commit comments