-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from MekDrop/improvement/added-supports-method-…
…for-factories Added supports* functions for factory constructors
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Imponeer\Contracts\ExtensionInfo\Exceptions; | ||
|
||
use Exception; | ||
use Throwable; | ||
|
||
/** | ||
* Exception that is thrown when factory doesn't supports such exception but asked to create one | ||
* | ||
* @package Imponeer\Contracts\ExtensionInfo\Exceptions | ||
*/ | ||
class UnsupportedExtensionException extends Exception | ||
{ | ||
|
||
/** | ||
* UnsupportedExtensionException constructor. | ||
* | ||
* @param string $name Extension name | ||
* @param int $code Error code | ||
* @param Throwable|null $previous Previous exception | ||
*/ | ||
public function __construct($name, $code = 0, ?Throwable $previous = null) | ||
{ | ||
parent::__construct($name . ' extension for this factory is not supported', $code, $previous); | ||
} | ||
|
||
} |
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