EndOfStreamException constructor

EndOfStreamException([
  1. String? message
])

Creates a new EndOfStreamException with an optional message.

Parameters

  • message: Optional custom message (defaults to standard message)

Example

throw EndOfStreamException('Expected 1024 bytes but only 512 available');

Implementation

EndOfStreamException([String? message]) : super(message ?? 'End of stream reached');