# ThreadInterruptedException constructor

ThreadInterruptedException(

1. String message

)

Exception thrown when an Isolate (thread) is unexpectedly interrupted during execution.

This typically represents a cancellation or termination signal being sent to an active isolate during processing. Use this exception when modeling thread-like behaviors with Dart Isolates to signal user-defined interruptions.

Example:

    if (isInterrupted) {
      throw ThreadInterruptedException("Worker isolate was interrupted.");
    }

## Implementation

    ThreadInterruptedException(super.message);