All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.kotlinx.io.internal.jvm.Errors.kt Maven / Gradle / Ivy

There is a newer version: 0.1.16
Show newest version
package kotlinx.io.internal.jvm

@PublishedApi
internal fun negativeShiftError(delta: Int): Nothing =
    throw IllegalStateException("Wrong buffer position change: negative shift $delta")

@PublishedApi
internal fun limitChangeError(): Nothing = throw IllegalStateException("Limit change is now allowed")

@PublishedApi
internal fun wrongBufferPositionChangeError(delta: Int, size: Int): Nothing =
    throw IllegalStateException("Wrong buffer position change: $delta. " +
            "Position should be moved forward only by at most size bytes (size = $size)")




© 2015 - 2025 Weber Informatics LLC | Privacy Policy