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

Add UnknownServiceException #333

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 5 additions & 0 deletions core/common/src/-CommonPlatform.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public expect open class EOFException : IOException {
public constructor(message: String?)
}

public expect open class UnknownServiceException : IOException {
public constructor()
public constructor(message: String?)
}


// There is no actual AutoCloseable on JVM (https://youtrack.jetbrains.com/issue/KT-55777),
// but on JVM we have to explicitly implement by RawSink and the compiler does not allow that.
Expand Down
6 changes: 6 additions & 0 deletions core/js/src/-PlatformJs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ public actual open class EOFException : IOException {
public actual constructor(message: String?) : super(message)
}

public actual open class UnknownServiceException : IOException {
public actual constructor() : super()

public actual constructor(message: String?) : super(message)
}

internal actual fun withCaughtException(block: () -> Unit): Throwable? {
try {
block()
Expand Down
2 changes: 2 additions & 0 deletions core/jvm/src/-JvmPlatform.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ package kotlinx.io
public actual typealias IOException = java.io.IOException

public actual typealias EOFException = java.io.EOFException

public actual typealias UnknownServiceException = java.net.UnknownServiceException
6 changes: 6 additions & 0 deletions core/native/src/-NonJvmPlatform.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ public actual open class EOFException : IOException {

public actual constructor(message: String?) : super(message)
}

public actual open class UnknownServiceException : IOException {
public actual constructor() : super()

public actual constructor(message: String?) : super(message)
}
6 changes: 6 additions & 0 deletions core/wasm/src/-PlatformWasm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ public actual open class EOFException : IOException {

public actual constructor(message: String?) : super(message)
}

public actual open class UnknownServiceException : IOException {
public actual constructor() : super()

public actual constructor(message: String?) : super(message)
}