withError static method
WorkerResponse with an error message and an optional (string) StackTrace.
Implementation
static WorkerResponse withError(Object exception, [StackTrace? stackTrace]) =>
[
null, // 0 - travel time
null, // 1 - result
SquadronException.from(exception, stackTrace), // 2 - error
null, // 3 - end of stream
null, // 4 - log message
];