code: public boolean setException(TBase<?, ?> result, Throwable cause) {
          final Class<?> causeType = cause.getClass();
          for (Entry<Class<Throwable>, TFieldIdEnum> e : exceptionFields.entrySet()) {
              if (e.getKey().isAssignableFrom(causeType)) {
                  ThriftFieldAccess.set(result, e.getValue(), cause);
                  return true;
              }
          }
          return false;
      }
docs: Sets the exception field of the specified {@code result} to the specified {@code cause}.