setError abstract method

void setError(
  1. Object error, [
  2. StackTrace? stackTrace
])

Injects an error state into the pipeline with optional stackTrace.

  • error: The error or exception object to store.
  • stackTrace: Optional stack trace associated with the error.

Ensures:

  • Transitions this node to the Error state (hasError == true).

Implementation

void setError(Object error, [StackTrace? stackTrace]);