CorallineTerminalIntent class abstract base

Core Concept (Error Delegation Intent): Defines the intended behavior for handling uncaught exceptions that occur asynchronously or unexpectedly within the topological pipeline during its lifecycle.

Operational Mechanism: If an unexpected error occurs during data propagation or lifecycle transitions (e.g., inside an asynchronous mapping or a resource cleanup), the pipeline safely catches it and delegates it to handleUncaughtError. By default, this forwards the error to the current Zone's error handler.

Intended Usage (Log Collection & Crash Analytics): Developers can subclass CorallineTerminalIntent and provide it to the terminal upon creation. This allows centralized intercepting and logging of silent pipeline errors to services like Sentry, Firebase Crashlytics, or Datadog without crashing the UI.

Example:

final class CrashlyticsIntent extends CorallineTerminalIntent {
  @override
  void handleUncaughtError(Object error, StackTrace stackTrace) {
    FirebaseCrashlytics.instance.recordError(error, stackTrace);
  }
}

// Inject the custom intent into the terminal
final terminal = pipeline.toTerminal(
  () => setState(() {}),
  intent: CrashlyticsIntent(),
);
Implementers

Constructors

CorallineTerminalIntent()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

handleUncaughtError(Object error, StackTrace stackTrace) → void
Invoked when the pipeline encounters an unexpected error that cannot be safely encapsulated within a damaged data snapshot.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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