Created
March 21, 2019 08:12
-
-
Save kanian/1fdc2b389bb6333064fbae71c7397e7c to your computer and use it in GitHub Desktop.
Example implementation of PSR-11 ContainerExceptionInterface
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
<?php | |
namespace Kanian\ContainerX\Exceptions; | |
use Exception; | |
use Psr\Container\ContainerExceptionInterface; | |
class DependencyIsNotInstantiableException extends Exception implements ContainerExceptionInterface | |
{ | |
public function __construct($dependency, $code = 0, Exception $previous = null) | |
{ | |
$message = "Dependency {$dependency} is not instantiable"; | |
parent::__construct($message, $code, $previous); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment