@Test public void handlesNoRootCause() { ApiException exception = new ApiException(null, GrpcStatusCode.of(Code.UNKNOWN), false); Throwable result = transformation.transform(exception); assertEquals(exception, result); }
@Override public Throwable transform(ApiException apiException) { for (Version version : catalog.getSupportedVersions()) { Optional<? extends BaseGoogleAdsException> result = version.getExceptionFactory().createGoogleAdsException(apiException); if (result.isPresent()) { return result.get(); } } return apiException; }
GoogleAdsExceptionTransformation implements ExceptionTransformingCallable.ExceptionTransformation { @Override public Throwable transform(ApiException apiException) { for (Version version : catalog.getSupportedVersions()) { Optional<? extends BaseGoogleAdsException> result = version.getExceptionFactory().createGoogleAdsException(apiException); if (result.isPresent()) { return result.get(); } } return apiException; } }
GoogleAdsExceptionTransformation implements ExceptionTransformingCallable.ExceptionTransformation { @Override public Throwable transform(ApiException apiException) { for (Version version : catalog.getSupportedVersions()) { Optional<? extends BaseGoogleAdsException> result = version.getExceptionFactory().createGoogleAdsException(apiException); if (result.isPresent()) { return result.get(); } } return apiException; }  }
GoogleAdsExceptionTransformation implements ExceptionTransformingCallable.ExceptionTransformation { @Override public Throwable transform(ApiException apiException) { for (Version version : catalog.getSupportedVersions()) { Optional<? extends BaseGoogleAdsException> result = version.getExceptionFactory().createGoogleAdsException(apiException); if (result.isPresent()) { return result.get(); } } return apiException; }  @Override Throwable transform(ApiException apiException); }
GoogleAdsExceptionTransformation implements ExceptionTransformingCallable.ExceptionTransformation { @Override public Throwable transform(ApiException apiException) { for (Version version : catalog.getSupportedVersions()) { Optional<? extends BaseGoogleAdsException> result = version.getExceptionFactory().createGoogleAdsException(apiException); if (result.isPresent()) { return result.get(); } } return apiException; }  @Override Throwable transform(ApiException apiException);  }