private static ApiException toApiException()

in kafka-connector/src/main/java/com/google/pubsub/kafka/source/StreamingPullSubscriber.java [76:96]


  private static ApiException toApiException(Throwable t) {
    try {
      throw t;
    } catch (ApiException e) {
      return e;
    } catch (ExecutionException e) {
      return toApiException(e.getCause());
    } catch (Throwable t2) {
      return new ApiException(t2, new StatusCode() {
        @Override
        public Code getCode() {
          return Code.INTERNAL;
        }

        @Override
        public Object getTransportCode() {
          return null;
        }
      }, false);
    }
  }