code: @Nullable
      public Object getResult(TBase<?, ?> result) throws TException {
          for (TFieldIdEnum fieldIdEnum : exceptionFields()) {
              if (ThriftFieldAccess.isSet(result, fieldIdEnum)) {
                  throw (TException) ThriftFieldAccess.get(result, fieldIdEnum);
              }
          }
  
          final TFieldIdEnum successField = successField();
          if (successField == null) { //void method
              return null;
          } else if (ThriftFieldAccess.isSet(result, successField)) {
              return ThriftFieldAccess.get(result, successField);
          } else {
              throw new TApplicationException(
                      TApplicationException.MISSING_RESULT,
                      result.getClass().getName() + '.' + successField.getFieldName());
          }
      }
docs: Converts the specified {@code result} into a Java object.