Skip to content

Commit

Permalink
Overload IOException constructor (#276)
Browse files Browse the repository at this point in the history
Closes #271
  • Loading branch information
Goooler authored Mar 12, 2024
1 parent 10f8f11 commit 0549884
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions core/common/src/-CommonPlatform.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ internal expect fun String.asUtf8ToByteArray(): ByteArray
public expect open class IOException(message: String?, cause: Throwable?) : Exception {
public constructor()
public constructor(message: String?)
public constructor(cause: Throwable?)
}

/**
Expand Down
4 changes: 3 additions & 1 deletion core/js/src/-PlatformJs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ public actual open class IOException actual constructor(
) : Exception(message, cause) {
public actual constructor(message: String?) : this(message, null)

public actual constructor() : this(null)
public actual constructor(cause: Throwable?) : this(null, cause)

public actual constructor() : this(null, null)
}

public actual open class EOFException actual constructor(message: String?) : IOException(message) {
Expand Down
4 changes: 3 additions & 1 deletion core/native/src/-NonJvmPlatform.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ public actual open class IOException actual constructor(
) : Exception(message, cause) {
public actual constructor(message: String?) : this(message, null)

public actual constructor() : this(null)
public actual constructor(cause: Throwable?) : this(null, cause)

public actual constructor() : this(null, null)
}

public actual open class EOFException actual constructor(message: String?) : IOException(message) {
Expand Down
4 changes: 3 additions & 1 deletion core/wasm/src/-PlatformWasm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ public actual open class IOException actual constructor(
) : Exception(message, cause) {
public actual constructor(message: String?) : this(message, null)

public actual constructor() : this(null)
public actual constructor(cause: Throwable?) : this(null, cause)

public actual constructor() : this(null, null)
}

public actual open class EOFException actual constructor(message: String?) : IOException(message) {
Expand Down

0 comments on commit 0549884

Please sign in to comment.