private StreamsException maybeWrapTaskException(final RuntimeException exception, final TaskId taskId) {
        if (exception instanceof StreamsException) {
            final StreamsException streamsException = (StreamsException) exception;
            streamsException.setTaskId(taskId);
            return streamsException;
        } else {
            return new StreamsException(exception, taskId);
        }
    }
Produces a string representation containing useful information about the TaskManager.
This is useful in debugging scenarios.

@return A string representation of the TaskManager instance.
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java