-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw a better exception if binary is not found (and catch it in test)
- Loading branch information
1 parent
b5c434f
commit ff5696b
Showing
4 changed files
with
40 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the OrbitaleImageMagickPHP package. | ||
* | ||
* (c) Alexandre Rock Ancelet <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Orbitale\Component\ImageMagick; | ||
|
||
use Exception; | ||
|
||
class MagickBinaryNotFoundException extends Exception | ||
{ | ||
public function __construct(string $magickBinaryPath) | ||
{ | ||
parent::__construct(\sprintf( | ||
'The specified path (%s) is not a file.'."\n". | ||
'You must set the "magickBinaryPath" parameter as the main "magick" binary installed by ImageMagick.', | ||
$magickBinaryPath | ||
)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters