# RuntimeException constructor

RuntimeException(

1. String message, {
2. Object? cause,
3. StackTrace? stackTrace,

})

Creates a new RuntimeException with a message and StackTrace.

Represents an unchecked runtime exception in JetLeaf.

A RuntimeException signals a system-level failure or application bug that was not expected at runtime. This is commonly used for failures such as invalid application state, misconfigurations, or internal logic errors that are not recoverable.

It includes a message, optional cause, and a `stackTrace` (defaults to StackTrace.current if not provided).

### Example:

    throw RuntimeException('Invalid state', cause: SomeOtherError());

## Implementation

    RuntimeException(this.message, {this.cause, StackTrace? stackTrace}) : stackTrace = stackTrace ?? StackTrace.current;