setError abstract method
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]);