add info about Invalid image

if there are many images in document are used and one of them throws `InvalidImageException` it is very difficult to detect which one without any message here...
This commit is contained in:
Anton Karakulov 2016-06-19 15:27:01 +03:00 committed by GitHub
parent 508d6194fc
commit 0652302423
1 changed files with 1 additions and 1 deletions

View File

@ -383,7 +383,7 @@ class Image extends AbstractElement
$imageData = @getimagesize($source);
}
if (!is_array($imageData)) {
throw new InvalidImageException();
throw new InvalidImageException(sprintf('Invalid image: %s', $source));
}
list($actualWidth, $actualHeight, $imageType) = $imageData;