code: public CommandResult exec(String commandLine) {
          CommandResult result = new CommandResult(RESULT);
  
          try {
              Object raw = shellSession.execute(commandLine);
  
              if(raw != null){
                  result.setContent(format(raw));
              }
  
          } catch (Exception e) { //NOSONAR
              //the result is an error
              result.setType(ERR);
              result.setContent(e.getMessage());
          }
  
          return result;
      }
docs: Execute a command on the gogo shell.
  
  @param commandLine The command to be executed.
  @return The CommandResult