more details when image doesn't match

This commit is contained in:
Adrian Cole 2012-04-05 16:55:32 -07:00
parent 0105e869c8
commit 32aaa4981f
1 changed files with 1 additions and 1 deletions

View File

@ -617,7 +617,7 @@ public class TemplateBuilderImpl implements TemplateBuilder {
Iterable<? extends Image> 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);