@Override
    public void logWarning(String message, Throwable t) {
      super.logWarning(message, t);
      errorString = message;
      hasError = true;
      // signal waiting queue with error condition
      handleExecutionResult(ERROR_RESULT);
    }
This prints out error messages when Exceptions occur in shell. Capture it and set error
flag=true and send ERROR_RESULT on the queue to signal thread waiting for CommandResult
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/HeadlessGfsh.java