FrameTooLargeException

class FrameTooLargeException(val size: Long, val maxSize: Int) : RuntimeException

Thrown from Unframer.feed when a length prefix exceeds the configured cap. Indicates a malformed stream or hostile peer; the Unframer should not be reused.

When propagated through unframedBy / decodeFramed, this exception terminates the downstream kotlinx.coroutines.flow.Flow with an error. Consumers that want to recover should wrap the Flow with .catch { }.

Constructors

Link copied to clipboard
constructor(size: Long, maxSize: Int)

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
Link copied to clipboard
expect open val message: String?
Link copied to clipboard
val size: Long