@Override
  public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy)
      throws Throwable {
    try {
      return methodProxy.invokeSuper(o, objects);
    } catch (Throwable t) {
      ThriftClient.resolveException(t, (ThriftClient) o);
      throw new TException(
          "Error in calling method " + method.getName() + ", because: " + t.getMessage(), t);
    }
  }
Note: The caller needs to ensure that the constructor corresponds to the class, or the cast
might fail.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/sync/SyncThriftClientWithErrorHandler.java