# StreamClosedException constructor

StreamClosedException([

1. String? message

])

Creates a new StreamClosedException with an optional `message`.

## Parameters

- `message`: Optional custom message (defaults to standard message)

## Example

    throw StreamClosedException('Input stream was closed unexpectedly');

## Implementation

    StreamClosedException([String? message]) : super(message ?? 'Stream has been closed');