Skip to content

Commit

Permalink
Expose not found image in ImageNotFoundException
Browse files Browse the repository at this point in the history
  • Loading branch information
bobvandevijver authored Jul 31, 2019
1 parent 9991266 commit 8344b8c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Exception/ImageNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@
* Class ImageNotFoundException
* Simple \Exception extend for better error origin check
*/
class ImageNotFoundException extends \Exception{
class ImageNotFoundException extends \Exception
{
private $imageLocation;

public function __construct($imageLocation)
{
$this->imageLocation = $imageLocation;

public function __construct($imageLocation){
parent::__construct("The image used is not found. Did you provide the complete path? (provided path = $imageLocation)");
}

/**
* @return mixed
*/
public function getImageLocation()
{
return $this->imageLocation;
}
}

0 comments on commit 8344b8c

Please sign in to comment.