code: @Override
    public Optional<Throwable> getError() {
      return redirector != null ? Optional.ofNullable(redirector.getError()) : Optional.empty();
    }
docs: Parses the logs of {@code spark-submit} and returns the last exception thrown.
  <p>
  Since {@link SparkLauncher} runs {@code spark-submit} in a sub-process, it's difficult to
  accurately retrieve the full {@link Throwable} from the {@code spark-submit} process.
  This method parses the logs of the sub-process and provides a best-effort attempt at
  returning the last exception thrown by the {@code spark-submit} process. Only the exception
  message is parsed, the associated stacktrace is meaningless.
  
  @return an {@link Optional} containing a {@link RuntimeException} with the parsed
  exception, otherwise returns a {@link Optional#EMPTY}