withError static method

WorkerResponse withError(
  1. Object exception, [
  2. StackTrace? stackTrace
])

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
    ];