Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make MalformedInputException actually inherit from exception #4094

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ktor-io/js/src/io/ktor/utils/io/charsets/CharsetJS.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package io.ktor.utils.io.charsets

import io.ktor.utils.io.core.*
import io.ktor.utils.io.core.internal.*
import io.ktor.utils.io.errors.IOException
import io.ktor.utils.io.js.*
import org.khronos.webgl.*

Expand Down Expand Up @@ -274,7 +275,7 @@ private data class CharsetImpl(val name: String) : Charset(name) {
override fun newDecoder(): CharsetDecoder = CharsetDecoderImpl(this)
}

public actual open class MalformedInputException actual constructor(message: String) : Throwable(message)
public actual open class MalformedInputException actual constructor(message: String) : IOException(message)

@Suppress("DEPRECATION")
private fun CharsetDecoder.decodeExactBytesSlow(input: Input, inputLength: Int): String {
Expand Down
3 changes: 2 additions & 1 deletion ktor-io/posix/src/io/ktor/utils/io/charsets/CharsetNative.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.ktor.utils.io.charsets

import io.ktor.utils.io.core.*
import io.ktor.utils.io.errors.IOException

/**
* Find a charset by name.
Expand Down Expand Up @@ -69,4 +70,4 @@ public actual val CharsetDecoder.charset: Charset get() = _charset
internal val platformUtf16: String = if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) "UTF-16BE" else "UTF-16LE"

// -----------------------------------------------------------
public actual open class MalformedInputException actual constructor(message: String) : Throwable(message)
public actual open class MalformedInputException actual constructor(message: String) : IOException(message)
Loading