# RuntimeException class

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());

Inheritance
  - Object
  - Error
  - RuntimeException
Implemented types
  - Throwable
Available extensions
  - ErrorExtensions
  - ExceptionExtensions
  - RuntimeExceptionExtensions
  - ThrowableExtensions

## Constructors

RuntimeException.new(String message, {Object? cause, StackTrace? stackTrace})
  Creates a new RuntimeException with a message and StackTrace.

## Properties

cause → Object?
  The underlying cause of this exception, if any.
  final
hashCode → int
  The hash code for this object.
  no setter inherited
message → String
  The message describing the error.
  final
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited
stackTrace → StackTrace
  The associated stack trace.
  final

## Methods

getCause() → Object
  The cause of this exception, if any.
  override
getMessage() → String
  The message associated with this exception.
  override
getStackTrace() → StackTrace
  The stack trace associated with this exception.
  override
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
printStackTrace([bool useErrorPrint = false]) → void

  Available on Error, provided by the ErrorExtensions extension

  Prints the error along with its stack trace.
printStackTrace([StackTrace? stacktrace, bool useErrorPrint = false]) → void

  Available on Exception, provided by the ExceptionExtensions extension

  Prints the exception and optional StackTrace if available.
printStackTrace([bool useErrorPrint = false]) → void

  Available on RuntimeException, provided by the RuntimeExceptionExtensions extension

  Extension on RuntimeException to support pretty stack trace printing.
printStackTrace([bool useErrorPrint = false]) → void

  Available on Throwable, provided by the ThrowableExtensions extension

  Extension on Throwable to support printing stack traces in a unified way.
toString() → String
  A string representation of this object.
  override

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited