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;
    }
Sets the exception field of the specified {@code result} to the specified {@code cause}.
thrift/thrift0.13/src/main/java/com/linecorp/armeria/internal/common/thrift/ThriftFunction.java