diff --git a/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java b/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java index 4930f5803e..272d4a8445 100644 --- a/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java +++ b/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java @@ -617,7 +617,7 @@ public class TemplateBuilderImpl implements TemplateBuilder { Iterable supportedImages = filter(images, imagePredicate); if (size(supportedImages) == 0) { if (imagePredicate == idPredicate) { - throw new NoSuchElementException(format("%s not found", idPredicate)); + throwNoSuchElementExceptionAfterLoggingImageIds(format("%s not found", idPredicate), images); } else { throwNoSuchElementExceptionAfterLoggingImageIds(format("no image matched predicate: %s", imagePredicate), images);