Skip to content

Commit 52d3c96

Browse files
committed
Add Okio exception message
1 parent 2fed4c3 commit 52d3c96

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/io/BuffereredSourceAdapter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ internal expect class BufferedSourceAdapter(source: okio.BufferedSource) : SdkBu
3838
internal inline fun <T> SdkBufferedSource.wrapOkio(block: SdkBufferedSource.() -> T): T = try {
3939
block()
4040
} catch (e: okio.EOFException) {
41-
throw EOFException("Okio operation failed", e)
41+
throw EOFException("Okio operation failed: ${e.message}", e)
4242
} catch (e: okio.IOException) {
43-
throw IOException("Okio operation failed", e)
43+
throw IOException("Okio operation failed: ${e.message}", e)
4444
}
4545

4646
// base class that fills in most of the common implementation, platforms just need to implement the platform specific

runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/io/internal/BufferOperations.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import aws.smithy.kotlin.runtime.io.*
1515
internal inline fun <T> SdkBuffer.wrapOkio(block: SdkBuffer.() -> T): T = try {
1616
block()
1717
} catch (e: okio.EOFException) {
18-
throw EOFException("Okio operation failed", e)
18+
throw EOFException("Okio operation failed: ${e.message}", e)
1919
} catch (e: okio.IOException) {
20-
throw IOException("Okio operation failed", e)
20+
throw IOException("Okio operation failed: ${e.message}", e)
2121
}
2222

2323
internal inline fun SdkBuffer.commonSkip(byteCount: Long) = wrapOkio { inner.skip(byteCount) }

0 commit comments

Comments
 (0)